www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/22/13:30:39

From: Ian Miller <itmiller AT dra DOT hmg DOT gb>
Newsgroups: gnu.g++.help,comp.os.msdos.djgpp
Subject: Re: fstream(char* <filename>, 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
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 <itmiller AT dra DOT hmg DOT gb> 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)

- Raw text -


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