How do I reuse a ostrstream?
So far I have replaced all code that does this
"delete <ostrstream>.st r()"
with
"<ostrstream>.f reeze(0)"
to allow the <ostrstream>.dt or to perform it's house keeping.
Now I need to reuse the ostrstream in a few places and am starting to do
this instead of deleting and recreating a ostrstream
<ostrstream>.fr eeze(0);
<ostrstream>.se ekp((strlen(<os trstream>.str() ) + 1), ios::cur);
Is this the correct way?
I have seen this in other code when browsing google but am unsure of
exactly what it is doing
<ostrstream>.se ekp(0, ios::beg);
TIA.
So far I have replaced all code that does this
"delete <ostrstream>.st r()"
with
"<ostrstream>.f reeze(0)"
to allow the <ostrstream>.dt or to perform it's house keeping.
Now I need to reuse the ostrstream in a few places and am starting to do
this instead of deleting and recreating a ostrstream
<ostrstream>.fr eeze(0);
<ostrstream>.se ekp((strlen(<os trstream>.str() ) + 1), ios::cur);
Is this the correct way?
I have seen this in other code when browsing google but am unsure of
exactly what it is doing
<ostrstream>.se ekp(0, ios::beg);
TIA.
Comment