#include #include using namespace std; int main() { ifstream infile("cowboy.bmp",ios::binary); ofstream outfile("copy.bmp",ios::binary); int fileByte; if (!infile) { cout << "File not opened" << endl; exit(0); } while (true) { fileByte = infile.get(); if (!infile) break; outfile.put(fileByte); } }