I have googled this, but I am still confused about how to use it. I am making a file manager, and I want to be able t o copy and paste a file into a new directory. I know
void copyFile(const std::string &from, const std::string &to) { std::ifstream is(from, ios::in | ios::binary); std::ofstream os(to, ios::out | ios::binary); std::copy(std::istream_iterator(is), std::istream_iterator(), std::ostream_iterator(os)); }