stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: Getting incorrect behavior on strstream
Date Mon, 25 Jun 2007 17:17:38 GMT
> -----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
https://msdn2.microsoft.com/en-us/library/k1z9z9cf(VS.80).aspx

Farid.

Mime
View raw message