From: Ian Miller Newsgroups: gnu.g++.help,comp.os.msdos.djgpp Subject: Re: fstream(char* , ios::in | ios::out) Date: Wed, 20 Nov 1996 12:36:26 +0000 Organization: DRA Lines: 32 Message-ID: <3292FB4A.2781E494@dra.hmg.gb> References: <32906510 DOT 41C67EA6 AT dra DOT hmg DOT gb> <56t6fa$gqb AT hamlet DOT ot DOT com DOT au> NNTP-Posting-Host: 146.80.115.106 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Rohan Lenard wrote: > > In article <32906510 DOT 41C67EA6 AT dra DOT hmg DOT gb>, Ian Miller writes: > :I'm trying to open a file for input *and* output using the constructor > :in the Subject. My experience is that this immediately truncates the > :file to zero length but I don't think it should. Is this behaviour a > :general gcc-27* thing? Is it perhaps a peculiarity of djgpp? Or is this > :behaviour correct? > : > > Here's what it says in the DWP it should do - > > Table 19--File open modes > > +---------------------------------------------+ > | ios_base stdio equivalent | > | Value(s) | > +---------------------------------------------+ > |in | out "r+" | > +---------------------------------------------+ > > Rohan > > -- > Rohan Lenard - rjl AT wr DOT com DOT au rjl AT ot DOT com DOT au rjl AT triode DOT net DOT au Quite so. I think this means that merely opening a file using this fstream constructor should NOT truncate the file. Am I right? -- Ian Miller, Dorset, UK DJGPP 2.01, Win95 DOS box (LFN undefined, FNCASE=y)