delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/26/12:47:27

Message-ID: <3634B3A3.A087237E@montana.com>
Date: Mon, 26 Oct 1998 10:38:43 -0700
From: bowman <bowman AT montana DOT com>
X-Mailer: Mozilla 4.5b2 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: strstream str() problem
References: <C12566A9 DOT 00333F43 DOT 00 AT hurricane DOT xircom DOT com>
Reply-To: djgpp AT delorie DOT com


Koen_Van_Herck AT xircom DOT com wrote:
> 
> fails to properly terminate the string s. (output is "test
> first\ngarbagegarbage...test\ngarbage..." It seems the str() function does
> not append the '\0' terminator to the string correctly. Is this a bug, or
> am I doing something wrong ?

if you have iostream.inf installed, take a look at it. The short answer:
if
you want the string null terminated, you need to do it yourself. the
info file
suggests
		 os << ends;


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019