【发布时间】:2018-04-06 11:34:20
【问题描述】:
我打开了两个文件,我想找到将数据从输出文件放入填充的最有效方法。
我尝试了rdbuf(),但它不起作用,并且输出文件相同,所以我需要对rdbuf() 进行更多解释,还有其他方法可以将文件附加到另一个文件吗?
ofstream writeto;
writeto.open(srr.c_str(),ios::app);
cout<<"give me the file you want to copy from : ";
string written;
cin>>written;
ifstream writefrom;
writefrom.open(written.c_str());
【问题讨论】:
标签: c++