ios::ate in gcc3.4.2
Wed Dec 22 03:17:00 GMT 2004
Hi, I have question on using ios::ate in fstream
the source as following
f.open("1", ios::out | ios::ate);
f << "Haha";
The file '1' is existed in current directory, its' content is "Merry
Christmas!", I want to add some words in the file(here
is the end of file, but my purpose is adding words in the middle of
file), but when I open file with ios::out | ios::ate,
it will clear the origal content of file '1' as if I open it in
ios::out. This occured in gcc3.4.2, when I use gcc2.9.5, it works
I don't know whether it is a bug in gcc3.4.2 or I use it in wrong way.
Best Wish with You!
China Integrated Circuit Design Center
Address: No.1 Gaojiayuan,Chaoyang District,Beijing,China.
Postcode: 100015 P.O.Box 8545
More information about the Gcc-help