#include #include void main(int argc, char* argv[]) { ifstream myInput(argv[1]); short ascii = 0; char c = 0; // read a char and output its ascii code, -1 means the end of file while ((c = myInput.get())!=-1) { ascii = (int) c; c = (char)(ascii); cout << "ASCII:" << ascii << '\t' << "char:" << c << endl; } myInput.close(); }