hi Guys,
i'm puzzled by the values i'm getting back from stringstream
output is!Code:#include <sstream> #include <iostream> int main(int argc, char* argv[]) { std::stringstream ss("1"); int x; ss >> x; std::cout <<"(" <<x <<")"; ss.str("1"); int y; ss >> y; std::cout <<"(" <<y <<")"; return 0; }
i was of course expecting:Code:(1)(-1)
it's causing problems in one of my programs.Code:(1)(1)
anyone got an explanation?
(i'm using code::blocks with mingw if that matters)