Opening a file for appending positions the file pointer at the end of the file. If you also want the read its contents, you have to seek to the beginning (or wherever you want to) before reading. (The OS maintains only one file pointer per file handle, not one for reading, and one for writing.)
In reply to Re: Openind file for read+append
by Eliya
in thread Openind file for read+append
by jaldama
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |