Message-ID: <3B9F74B4.467A3C5C@iolfree.ie> From: Nino Matassa X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: strstream *seem* not to work! Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 33 Date: Wed, 12 Sep 2001 14:43:42 GMT NNTP-Posting-Host: 194.128.43.122 X-Complaints-To: abuse AT iol DOT ie X-Trace: news.iol.ie 1000305822 194.128.43.122 (Wed, 12 Sep 2001 15:43:42 BST) NNTP-Posting-Date: Wed, 12 Sep 2001 15:43:42 BST Organization: Ireland On-Line Customer To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi,

the code below can be copied/pasted/compiled and so on......
The commented out section at the end is its output. Not what I expected. I'm running djgpp under Windows 2000 if that has any relevance. Do you have any idea why this code code produces that output?
Any help in understanding this is greatly appreciated.
Thanks.
N.

I'm using gcc version 2.95.3 on Windows2000.

**************************************************************************
/* Exp.cpp */

#include<iostream>
#include<strstream>

#define size 1024

void main(void) {
 static char buffer[size];
 ostrstream os(buffer, size, ios::app);
 os << "Hello World!" << endl << ends;
 cout << os;
}

/*
D:\root\Misc\source\C++>a
0xffffffff
*/
**************************************************************************
--
Nino.

Non illegitimes conturbabunt