用ifstream 打开文件 用seekg定位到指定位置
读取后关闭即可。
代码
char read_pos(char *name, int offset){ ifstream f(name); f.seekg(offset); return f.get();}