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]

ostringstream not working?


Hi,

The following program does not give the output what I'm expecting. It just writes 

t

to cout. Is it an error of me or the library (I'm using version 2.90.5 on egcs-19990608 snapshot on a SuSE 6.1 Linux host)

--------------------------------------------------------------
#include <iostream>
#include <sstream>

int main( void)
{
  ostringstream os;
  
  os << "this is a test " << 42 << ". What's wrong?";
  cout << os.str() << endl;
   
  return 0;
  
}
---------------------------------------------------------------

Thanks in advance,

Olaf

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