#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream ifs;
ifs.open("yyp.cpp");
ofstream ofs;
ofs.open("hello1.txt");
char a[100];
while (!ifs.eof())
{
ifs.getline(a,100);
ofs << a << endl;
}
ifs.close();
ofs.close();
system("pause");
return 0;
}
#include <fstream>
using namespace std;
int main()
{
ifstream ifs;
ifs.open("yyp.cpp");
ofstream ofs;
ofs.open("hello1.txt");
char a[100];
while (!ifs.eof())
{
ifs.getline(a,100);
ofs << a << endl;
}
ifs.close();
ofs.close();
system("pause");
return 0;
}