strstream bug

Benjamin Kosnik bkoz@cygnus.com
Tue Aug 24 15:37:00 GMT 1999


Igor, 

v-3 uses the standard approved stringstreams. Thus you can do stuff like:

#include <iostream>
#include <sstream>

int main() 
{
  string s("012345678");
  istringstream sts(s);
  int i;
  sts >> i;
  cout << i << endl;

  return 0;
}

/*
gives you:
% a.out
12345678
*/


That should take care of your first bug. The second one is incomplete, and
I'm not quite sure what you'd expect (zero in == zero out)? In anycase, I
don't have overloaded insertion/extraction operators to test with.


Hope this helps,
Benjamin




More information about the Libstdc++ mailing list