This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
another problem with ostringstream
- To: libstdc++@sourceware.cygnus.com
- Subject: another problem with ostringstream
- From: dek@cgl.ucsf.edu
- Date: Thu, 05 Aug 1999 12:37:12 -0700
- Cc: bkoz@cygnus.com
- Reply-to: dek@cgl.ucsf.edu
OK, the following program fails for me (Mandrake 6.0, gcc-2.95, libstdc++ from CVS).
It only fails if i_max is set high enough, about 250 or so. I get a string full of
NULLs with just one character.
#include <fstream>
#include <iostream>
#include <sstream>
const int i_max=250;
int main()
{
ostringstream x;
for (int i=0; i < i_max; i++) {
x << "Test" << endl;
}
std::cout << x.str() << endl;
return 0;
}