strstream
Thomas Matelich
tomsara@slip-stream.net
Thu Dec 3 14:57:00 GMT 1998
Are there any known bugs in strstream? It seems like I'm getting a
memory overwrite. I haven't been able to distill a smaller testcase
yet, but here is the offending code and the offensive output:
ostrstream ss;
ss << "T" << next_temp;
string hold_it(ss.str());
cout << "This temp channel will be named " << hold_it << endl;
cout << "Here is the next line" << endl;
where next_temp is an unsigned int.
The output from this is:
This temp channel will be named T400000
-36.000000 -208.000000
-33.000000 -211.000000
-43.000000 -211.000000
-59.000000 -217.000000
-75.@ä
Here is the next line
Any suggestions (besides sprintf) would be appreciated.
--
Thomas O Matelich
Senior Programmer
Zetec, Inc.
tmatelich@zetec.com
tomsara@slip-stream.net
More information about the Gcc-bugs
mailing list