stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: Getting incorrect behavior on strstream
Date Mon, 25 Jun 2007 17:35:53 GMT
Farid Zaripov wrote:
>> -----Original Message-----
>> From: Jeremy Dean [mailto:dean@roguewave.com] 
>> Sent: Friday, June 22, 2007 11:45 PM
>> To: stdcxx-dev@incubator.apache.org
>> Subject: Getting incorrect behavior on strstream
>>
>> I have a testcase that is showing incorrect behavior ostrstream or
>> ostringstream:
> 
> [...]
> 
>> Any thoughts on this problem?
> 
>   ostrstream::str() returns just the beginning pointer to the sequence.
> The sequence don't
> have the null character unless you especially inserted it. You should
> print no more that
> otrstream::pcount() characters.
> 
>   See Remarks on the page

Better yet, refer to the stdcxx Class Reference :)

http://incubator.apache.org/stdcxx/doc/stdlibref/strstreambuf.html#idx1224

Martin


Mime
View raw message