64,444
社区成员
发帖
与我相关
我的任务
分享
#include <fstream>
using namespace std;
int main(){
fstream in("aaa.txt",ios::in);
fstream out("bbb.txt",ios::out);
if(!in)//判断打开是否成功
return 0;
while(!in.eof()){
char ch=in.get();
out.put(ch);
}
return 0;
}
if(infile.eof())
{
/* 达到文件尾 */
}
else
{
/* 未达到文件尾 */
}