Sunday, February 13, 2011

Comments:


Comments:
Comments in programming languages are those statements which are not needed to compile by the compiler. C++ supports both single line and multiple line comments. Single line comment is also known as double slash comment (i.e. //). It this comment is to be used for multiple line, we should use // for each line separately.
e.g.
   //This is single line
  // comment used for multiple line
Again, it supports C style comment (i.e. /*    */). This type of comment is generally used for multiple lines. The lines between /* and */ are not compiled.

No comments:

Post a Comment