Mail Archives: djgpp/1996/11/22/13:30:39
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 -