sstream (probably revisited)
Benjamin Kosnik
bkoz@redhat.com
Thu Aug 23 11:37:00 GMT 2001
Um. If possible, please post in plain text.
The following fixed code works as you expect:
//#include <strstream>
#include <sstream>
#include <iostream>
int main()
{
// std::ostringstream oss;
std::stringstream oss;
std::string s = "1235";
oss << s;
long l = 0;
oss >> l; // xxx no operator >> long for ostream
std::cout << l << std::endl;
return 0;
}
// should output: 1235
// current output: 0
More information about the Libstdc++
mailing list