#include #include using namespace std; int main(int argc, char* argv[]) { if ( argc != 2 ) { cerr << "ERROR: File argument missing." << endl; return 1; } ifstream ifs(argv[1]); if ( ! ifs ) { cerr << "ERROR: File could not be opened." << endl; return 1; } char c; while ( ifs.get(c) ) { cout << c; ifs.get(c); ifs.ignore(c); } ifs.close(); return 0; }