Thursday, July 24, 2008

A NEW FORM FOR COMMENTS.

It is always good practice to provide comments within your code so that it can be read and understood by others. In C, comments were placed between the tokens /* and */ like this:

/* This is a traditional C comment */

C++ supports traditional C comments and also provides an easier comment mechanism, which only requires an initial comment delimiter:

// This is a C++ comment

Everything after the // and to the end of the line is a comment.

No comments: