64,685
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void main()
{
ifstream inFile;
ofstream outFile;
string s1;
inFile.open("x.txt");
outFile.open("m.txt");
getline(inFile,s1);
cout << s1;
outFile.write(s1.c_str(), s1.length());
inFile.close();
outFile.close();
}