I have a library that does all sorts of things and it only uses FILE_WRITE. Seems to be able to read and write no problem.
I'm working on this new piece of code and if I open with FILE_WRITE.. It only lets me write. If I try reading I get 0 bytes bytes read. If I open it with FILE_READ then it works. It also works if I just omit the READ WRITE thing all together.
What's the rules here? The reference documentation seems a little spotty for this stuff.
If you open a file for write, it's going to append data to the file, so the current position in the file is the end. If you try to read from the file at that point, there's nothing more to read, as you observe.
wildbill:
If you open a file for write, it's going to append data to the file, so the current position in the file is the end. If you try to read from the file at that point, there's nothing more to read, as you observe.