C++ Comment Tutorial

C++ comment are using for what are code is doing

Program comments are interpreted statements, and you can include comments in C++ code, which will improve the readability of the source code. All programming languages allow some form of annotation.

C++ supports single-line comments and multi-line comments. All characters in the comment are ignored by the C++ compiler.

C++ comments start with /* and terminate with */. For example:

/* This is a comment*/ /* C++ comments can also * Interline */

Single Line Comment

A comment line started with double slash (//) is called single line comment.


Multi Line Comment

Multi line comment begin with /* and end with */

/*This comment is multiple lines*/
You can comment use anywhere