- 论坛徽章:
- 0
|
打开方式用 "rb+" 就可以了。
别使用"a" or "w".
r or rb open file for reading
w or wb truncate to zero length or create
file for writing
a or ab append; open file for writing at
end of file, or create file or
writing
r+, rb+, or r+b open file for update (reading and
writing)
w+, wb+, or w+b truncate file to zero length or
create file for update
a+, ab+, or a+b append; open or create file for
update at end-of-file When a file is opened for append (i.e., when type is a, a+, ab+, or
a+b), it is impossible to overwrite information already in the file.
All output is written at the end of the file, regardless of
intervening calls to fseek().
[ 本帖最后由 zhhui2000 于 2006-7-23 09:45 编辑 ] |
|