www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/18/19:19:21

From: "Campbell, Rolf [SKY:1U32:EXCH]" <cp1v45 AT americasm01 DOT nt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: strstream repositioning problem
Date: Wed, 18 Aug 1999 11:36:37 -0400
Organization: Nortel Networks
Lines: 25
Message-ID: <37BAD305.7E501FD0@americasm01.nt.com>
References: <w%ju3.26224$X3 DOT 404951 AT news DOT tpnet DOT pl>
NNTP-Posting-Host: bmerhc00.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.7 [en] (X11; I; HP-UX B.10.20 9000/712)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Piotr Eljasiak wrote:

> My problem regards strstream repositioning - every time I seekg()
> to stored position and then write to strstream, data in strstream
> is truncated. Here is my sample code:

[snip]

> Instead of (IMHO) "The quick brown fox jumped over the lazy dog. *** quick
> brown fox jumped over the lazy dog. "
> the output is truncated to "The quick brown fox jumped over the lazy dog.
> ***".
> Where is an error in the above code ?

    Is strstream part of the ANSI C++ standard?  Anyways, I agree that it
should work the way you expect, but I suspect that it was programed to use
something similar to strcat to impliment the "<<" operator.  Some day when
I'm not too lazy, I'll take a look at the sources and see what I can do (if
the maintainers agree with our conclusion)

--
     -Rolf Campbell (39)3-6318



- Raw text -


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