I use a fstream variabile to open a file in write and read mode.
What's the difference between using seekg or seekp?Code:fstream file; file.open("filepath", ios::in | ios::out | ios:: binary);
There's really two different pointers or there's only one?
Why if i read things, write things then move the pointer to the beginning to overwrite data (using for example file.seekp(0)) it writes the data to the end of the file?
I used seekg and seekp either for moving read and write pointers (if there's really two), i also tried to use only seekg.. ah and everytime i write something, before reading or moving the pointer, i flush the fstream.



LinkBack URL
About LinkBacks


