I hope this was just an example of using iterators, since copying files can be done much simpler:
#include <fstream> using namespace std; int main() { ifstream f1("input.txt", fstream::binary); ofstream f2("output.txt", fstream::trunc|fstream::binary); f1 << f2.rdbuf(); }
Recent comments
14 hours 24 min ago
19 hours 28 min ago
19 hours 57 min ago
1 day 12 hours ago
1 day 19 hours ago
1 week 6 days ago
3 weeks 13 hours ago
3 weeks 1 day ago
3 weeks 3 days ago
3 weeks 4 days ago