I was wondering if anyone knew of a way to use std::copy() and
istream_iterato r<>/ostream_iterato r<> 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("someOtherF ile");
std::copy(std:: istream_iterato r<unsigned char>(in),
std::istream_it erator<unsigned char>(),
std::ostream_it erator<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_iterato r<>/ostream_iterato r<> 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("someOtherF ile");
std::copy(std:: istream_iterato r<unsigned char>(in),
std::istream_it erator<unsigned char>(),
std::ostream_it erator<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
Comment