From: "Andrew D. Jones" Newsgroups: comp.os.msdos.djgpp Subject: Re: strstream *seem* not to work! Message-ID: References: <3B9F74B4 DOT 467A3C5C AT iolfree DOT ie> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 42 Date: Thu, 13 Sep 2001 22:34:10 GMT NNTP-Posting-Host: 24.102.32.191 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 1000420450 24.102.32.191 (Thu, 13 Sep 2001 15:34:10 PDT) NNTP-Posting-Date: Thu, 13 Sep 2001 15:34:10 PDT Organization: Excite AT Home - The Leader in Broadband http://home.com/faster To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Can you please *not* post in HTML? Some of use use newsreaders that don't like HTML. Plaintext is good, believe you me. :) -- Andrew D. Jones On Wed, 12 Sep 2001 14:43:42 GMT, Nino Matassa wrote: > > >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 >
  >