Question

Write a program that reads a C++ program file, and echos all the comments onto the screen, omitting the leading //. The name of the C++ program file is supplied as the command line argument.

Run the program on itself. If you can't make any sense of the output, then your commenting is inadequate (Hint: Do this on all your assignments.)

Answer