myFile.open("test.txt",ios::in);char line[101];while(!myFile.eof()){myFile.getline(line,100);/* 数据处理 */}myFile.close();