文件的读写
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream in("in.cpp");
ofstream out("out.cpp");
string s;
while(getline(in,s))
{
cout<<s<<"\n";
out<<s<<"\n";
}
return 0;
}
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream in("in.cpp");
ofstream out("out.cpp");
string s;
while(getline(in,s))
{
cout<<s<<"\n";
out<<s<<"\n";
}
return 0;
}