| delorie.com/archives/browse.cgi | search |
| Message-ID: | <3B9F74B4.467A3C5C@iolfree.ie> |
| From: | Nino Matassa <nino AT iolfree DOT ie> |
| 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! |
| 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 |
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi,
<p>the code below can be copied/pasted/compiled and so on......
<br>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?
<br>Any help in understanding this is greatly appreciated.
<br>Thanks.
<br>N.
<p>I'm using gcc version 2.95.3 on Windows2000.
<p>**************************************************************************
<br>/* Exp.cpp */
<p>#include<iostream>
<br>#include<strstream>
<p>#define size 1024
<p>void main(void) {
<br> static char buffer[size];
<br> ostrstream os(buffer, size, ios::app);
<br> os << "Hello World!" << endl << ends;
<br> cout << os;
<br>}
<p>/*
<br>D:\root\Misc\source\C++>a
<br>0xffffffff
<br>*/
<br>**************************************************************************
<br>--
<br>Nino.
<p>Non illegitimes conturbabunt
<br>
<br> </html>
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |