sstream (probably revisited)
jacob smith
nilrem235@hotmail.com
Thu Aug 23 09:36:00 GMT 2001
Howdy! The last time I updated my GCC library there was no sstream (stringstream). Does v 3.0 have a working stringstream? I tried looking for one and found a 2.95.2(?) but it appeared that the ostringstream code didn't work (i.e. I couldn't figure out how to make it work?).
ÃÂ
example code that *should* work:
ÃÂ
std::ostringstream oss;
std::string s = "1235";
oss<<s;
long L = 0;
oss>>L;
std::cout<<L<<std::endl;
ÃÂ
should output: 1235
current output: 0
-->same holds for stringstream. Also my compiler sometimes crashes if I don't append a '\n' to the end of strings when using istringstream and then use the extraction operator (>>).
ÃÂ
thanks,
-j.s. Get your FREE download of MSN Explorer at http://explorer.msn.com
More information about the Libstdc++
mailing list