I create a ostringstream object, and use it to write to. After having done
this, I want to re-use it, but first I need to clear out all characters in
it. How do I do this?
"Charles Herman" <sp**@no.spam> wrote in message
news:3f********@127.0.0.1...
I create a ostringstream object, and use it to write to. After having
done this, I want to re-use it, but first I need to clear out all characters in it. How do I do this?
I create a ostringstream object, and use it to write to. After having done this, I want to re-use it, but first I need to clear out all characters in it. How do I do this?
use the str() member function:
ostringstream os;
os << "bla";
os.str(""); // assign empty string to os
HTH & kind regards
frank
--
Frank Schmitt
4SC AG phone: +49 89 700763-0
e-mail: frankNO DOT SPAMschmitt AT 4sc DOT com
Is there a common defintion of Clear that applies to both
objects and collections? If so, where is it documented.
My preconceived notion is that Clear means "reset the
object to its initial...
I have to read data from an external source, massage the data, concatenate it
to one long string, then write it to a textfile. So I am experimenting with
the StringBuilder object. I append the...
Hello Everybody.
I have a Segmentation fault problem. The code section at the bottom
keeps throwing a Segmentation fault when it enters the IF block for the
second time.
const int...
I have created a collection class derived from CollectionBase that can be
nested several layers deep. so my root object has several child objects,
each of which has several grandchild objects, and...
I have pasted at the end of this message a small sample program I whipped up
to do some testing.
It's a form with a datagrid and two buttons. Each button clears the
dataTable that is the source...
hi all:
I want erase a stringstream' content for input new data to it.
example:
std::stringstream stm;
stm<<"this is a string";
std::cout<<stm.str();
// here print:this is a string
I tried to clear a list today (which I do rather rarely, considering
that just doing l = works most of the time) and was shocked, SHOCKED
to notice that there is no clear() method. Dicts have it,...
I have a multiple select list that is created dynamically based on a
previous selection on an asp page. The first thing I do is to clear
the curent option list by
...
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...