I use a fstream variabile to open a file in write and read mode.
Code:
fstream file;
file.open("filepath", ios::in | ios::out | ios:: binary);
What's the difference between using seekg or seekp?
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.