From the FAQ:
Also, as a general comment, you can improve your commenting style. A comment shouldn't simply restate one line of code. If your code is so obfuscated that you need a comment line to explain every line, then rewrite your code to be more clear.
And you are using old headers. This is a little better:
One acceptable use of comments for small sections of code is to name the parameters of a messy function, like WinAPI calls. For example, this:
using namespace std;
Program entry point. Queries the user for their age, and
outputs a text message depending on the value they enter.
cout<<"Please input your age: ";
cout<<"You are pretty young!";
cout<<"You are old";
cout<<"You are really old";
HANDLE h = CreateFile(
"c:\\file.txt", // file name
GENERIC_READ, // Access permissions
0, // Share mode
NULL, // Pointer to security attributes
OPEN_EXISTING, // Open vs. create options
0, // Flags
NULL // Handle to template file
* Summarize a function or portion of a function, or
* Summarize the parameters or returns of a function, or
* Provide information that otherwise would not be obvious
In this case, my commented version of your code does the first 2 (it allows you to discern the purpose of the function) and my WinAPI comment serves the third purpose. You could not look at, for example, the Share Mode parameter and know what it was, except for the comment that says it is share mode.