This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

another problem with ostringstream



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;
}



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