Difference between seekp() and seek()

What are the difference between seekp() and seekg() ?
seekg() should be a ifstream method, and seekp() a ofstream methods, so if i use fstream i can use both, can't i? and which difference there is? can i use only seekg() with the same effect i would have if i used seekp() for writing operation?
seekg = seekGet and seekp = seekPut . when you use fstream you can read and write because fstream inherit from both stream.
so i can use seekg for writing without any problem, right?
thanks
so i can use seekg for writing without any problem, right?
No. seekg() moves the read pointer.
Topic archived. No new replies allowed.