#include <iostream>
#include <fstream>
using namespace std;
int main(){
ifstream f1;
char ch;
f1.open("1.txt");
if (!f1)
{
cout<<"不能打开1.txt文件\n";return 0;
}
ofstream f2;
f2.open("2.txt");
if (!f2)
{
cout<<"不能打开2.txt文件\n";return 0;
}
while (f1.get(ch))
{
f2.put(ch);
}
cout<<"IS Over!\n";
return 0;
}
#include <fstream>
using namespace std;
int main(){
ifstream f1;
char ch;
f1.open("1.txt");
if (!f1)
{
cout<<"不能打开1.txt文件\n";return 0;
}
ofstream f2;
f2.open("2.txt");
if (!f2)
{
cout<<"不能打开2.txt文件\n";return 0;
}
while (f1.get(ch))
{
f2.put(ch);
}
cout<<"IS Over!\n";
return 0;
}

被折叠的 条评论
为什么被折叠?



