Skip to content

Instantly share code, notes, and snippets.

@meritozh
Created April 8, 2016 02:00
Show Gist options
  • Save meritozh/da505adba5b290dcc807660ad6f02816 to your computer and use it in GitHub Desktop.
Save meritozh/da505adba5b290dcc807660ad6f02816 to your computer and use it in GitHub Desktop.
file stream to file stream
#include <fstream>
int main(int argc, char const *argv[])
{
std::ifstream input(argv[1], std::ios::binary);
std::ofstream output(argv[2], std::ios::binary);
output << input.rdbuf();
input.close();
output.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment