seek()函数 read()函数 大致做法 char map[10][10]; file.seekg(sizeof(map)*(gate-1));//偏移量,第二个参数默认的话就是当前文件指针所在的位置 file.read(*map,sizeof(map)); file.close();