// File: testSeekPtr.cpp // See if seekg moves the p pointer and vice versa #include #include using namespace std; int main() {fstream binFile("Students.bin",ios::in|ios::out|ios::binary); binFile.seekg(32); cout << "Following seekg to byte 32...\n"; cout << "Get Pointer: " << binFile.tellg() << " Put Pointer: " << binFile.tellp() << endl; binFile.seekp(54); cout << "Following seekp to byte 54...\n"; cout << "Get Pointer: " << binFile.tellg() << " Put Pointer: " << binFile.tellp() << endl; }