Please take a look at thisWhat is the difference between seekp() and seekg()? They seem to always moving together.Code:fstream* file1 = new fstream("C:\\Testfile.sia", ios_base::out); file1->close(); file1->open("C:\\Testfile.sia"); cout << file1->tellp() << endl; cout << file1->tellg() << endl; file1->write("somethingsinlifetheyjustdon'wannasee",30); file1->seekp(10); file1->seekg(5); cout << file1->tellp() << endl; cout << file1->tellg() << endl; file1->close();
[edit] I was ... . I just don't know why they move together.Originally Posted by MSDN