T
Thomas J. Clancy
I was wondering if anyone knew of a way to use std::copy() and
istream_iterator<>/ostream_iterator<> write a file copy function that is
quick and efficient.
Doing this messes up the file because it seems to ignore '\n'
ifstream in("somefile");
ofstream out("someOtherFile");
std::copy(std::istream_iterator<unsigned char>(in),
std::istream_iterator<unsigned char>(),
std:stream_iterator<unsigned char>(out));
Now, I figured out how to do it correctly but it is dog slow. I was
wondering if anyone knew how to do this in an ellegant manner?
thomas j. clancy
istream_iterator<>/ostream_iterator<> write a file copy function that is
quick and efficient.
Doing this messes up the file because it seems to ignore '\n'
ifstream in("somefile");
ofstream out("someOtherFile");
std::copy(std::istream_iterator<unsigned char>(in),
std::istream_iterator<unsigned char>(),
std:stream_iterator<unsigned char>(out));
Now, I figured out how to do it correctly but it is dog slow. I was
wondering if anyone knew how to do this in an ellegant manner?
thomas j. clancy