首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

fstream连续打开文件的有关问题

2012-04-26 
fstream连续打开文件的问题C/C++ codefstream filefile.open(1.txt)while(!file.eof()){}file.close()

fstream连续打开文件的问题

C/C++ code
fstream file;file.open("1.txt");while(!file.eof()){}file.close();file.open("2.txt");while(!file.eof()){}


这样会出现打开第二个文件有错,2.TXT明明有数据,却被判定为没有数据,求教


[解决办法]
http://topic.csdn.net/u/20120421/11/17982952-3518-4264-9e83-1f5d507b106a.html
[解决办法]
不行就先clear

热点排行