quick question about fstream

I have open a file for reading and writing.
1
2
fstream file;
file.open ("file.dat", ios::in | ios::out);

I need read and replace some information et the beginning of file and then jump to the end of file for writing.

Can I go to the end of file for writing without closing this stream and then opening in different mode?

Thanks!
ios_base::end may help, as may seekg(). You may find out more about these in the following link.

http://cplusplus.com/reference/iostream/istream/seekg/

-Albatross
Topic archived. No new replies allowed.