Message-ID: <3634B3A3.A087237E@montana.com> Date: Mon, 26 Oct 1998 10:38:43 -0700 From: bowman 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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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;