在ifstream里面有成员函数fseekg(int offset,ios::XX)函数,前一个为偏移位置,后一个是宏声明有beg,cur和end。在ofstream里面有成员函数fseekp(),用法基本相同。