This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
ostringstream not working?
- To: libstdc++@sourceware.cygnus.com (Non Receipt Notification Requested) (IPM Return Requested)
- Subject: ostringstream not working?
- From: Olaf Ronneberger <Olaf.Ronneberger@gmx.de>
- Date: Wed, 23 Jun 1999 15:04:09 +0200
- Alternate-Recipient: Allowed
- X400-Content-Type: P2-1984 (2)
- X400-MTS-Identifier: [/PRMD=dwd/ADMD=d400/C=de/;2D9D3770DB49001-mailer.dwd]
- X400-Originator: Olaf.Ronneberger@gmx.de
- X400-Received: by mta d400relay in /PRMD=dfnrelay/ADMD=d400/C=de/; Relayed; Wed, 23 Jun 1999 15:00:00 +0200
- X400-Received: by /PRMD=dwd/ADMD=d400/C=de/; Relayed; Wed, 23 Jun 1999 15:04:09 +0200
- X400-Recipients: non-disclosure:;
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