public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/4627: ios::ate open does not seek to EOF, it truncates
@ 2001-10-20 19:54 rodrigc
  0 siblings, 0 replies; only message in thread
From: rodrigc @ 2001-10-20 19:54 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, tmwg-gcc

Synopsis: ios::ate open does not seek to EOF, it truncates

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Oct 20 19:54:02 2001
State-Changed-Why:
    Look at page 659 of the ISO C++ standard.
    If you open an ofstream for writing, if you
    do not specify ios::app, then it
    will be equivalent to opening the file
    with fopen() with the "w" mode.  This will
    truncate the file before writing to it.
    
    So, if you want to open an ofstream for writing,
    add ios::app to the mode if you want to append to it.
    
    Not a gcc bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4627&database=gcc


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-20 19:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-20 19:54 libstdc++/4627: ios::ate open does not seek to EOF, it truncates rodrigc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).