From: "Campbell, Rolf [SKY:1U32:EXCH]" 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: NNTP-Posting-Host: bmerhc00.ca.nortel.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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