This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

sstream (probably revisited)


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]