bug or not

Eljay Love-Jensen eljay@adobe.com
Sun Sep 21 14:59:00 GMT 2003


Hi Anthony,

The problem isn't that you are using a ostringstream's string-parm constructor.

The problem is that you are printing out the string used to INITIALIZE the ostringstream.  What you should be doing is printing out the CURRENT contents of the ostringstream buffer.

Use the...
cout << outBuffer.str() << endl;
...method of accessing the ostringstream's string in the first situation.

HTH,
--Eljay




More information about the Gcc-help mailing list