#include <algorithm>
#include <fstream>
int main()
{
std::ifstream in("fileforread.tmp");
std::ofstream out("fileforappend.tmp",std::ios_base::app);
std::istreambuf_iterator<char> src(in.rdbuf());
std::istreambuf_iterator<char> end;
std::ostream_iterator<char> dest(out);
std::copy(src,end,dest);
}
|