#include<iostream>
#include<fstream>
#include<cstring>
using namespace std;
int main()
{
ifstream fin1,fin2;
ofstream out;
fin1.open("first.txt");
fin2.open("second.txt");
out.open("result.txt");
string first,second;
getline(fin1,first,'\n');
getline(fin2,second,'\n');
while(fin1){
out<<first<<endl;
out<<second<<endl;
getline(fin1,first,'\n');
getline(fin2,second,'\n');
if(first=="@")break;
}
out<<"@"<<endl;
fin1.close();
fin2.close();
return 0;
}
getLine
最新推荐文章于 2019-06-21 16:41:38 发布