I opened two files and I want to find the most efficient way to put data from out file to in fill.
I tried rdbuf()
but it doesn't work and the outfile is the same so I need to have more explanation for rdbuf()
and is there another method to append a file to another?
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());