// // mcat file // // Goal - same as cat in shell command // #include #include using namespace std; int main(int argc, char* argv[]) { ifstream infile; infile.open(argv[1]); char ch; if (argc == 1) cout << "No arg. Please attach the file\n"; else if (argc >= 3) cout << "Too much arg.\n"; else { //cout << "Work here.\n"; //cout << "The cmd is: " << argv[0] << endl; //cout << "The arg. is: " << argv[1] << endl; infile.get(ch); // priming read while(infile) // EOF- { cout << ch; infile.get(ch); } } return 0; }