#include #include using namespace std; int main() { ifstream myInfile("cowboy.bmp"); ofstream myOutfile("cowboyCopy.bmp"); char userChar; int r,g,b; if ( !myInfile ) { cout << "no such file" << endl; return 0; } for(int i = 1; i <= 54; i++) { userChar = myInfile.get(); myOutfile.put(userChar); } while (true) { //userChar = myInfile.get(); b = myInfile.get(); g = myInfile.get(); r = myInfile.get(); if ( !myInfile ) { break; } //myOutfile.put(0); myOutfile.put(r); myOutfile.put(g); myOutfile.put(b); } }