In C++ programing language we can use comments to define different sections in the program itself. Comments in C++ are not detected by the C++ compiler, it ignores the comments and simply does not compline or give any error related to comments. However there is a code or say format set to define comments in C++, otherwise it will show an error while compiling the code. Comments are denoted by // , whenever you write a comment in a C++ program you need to put // before it so that the compiler knows it is a comment and ignores it while compiling the program. C++ program sample with comment Here is a simple code program which also has comment in it // A sample program #include <iostream.h> void main ( ) { cout<<"Hello There!!" ; /* This is a simple program with both of the comment types */ } In the above program, you can see that there are two types of comments that are used. Lets us see the Two types of Comments in the C++ Program. Types of Comments in C++ Pr...
Learn C++ Programming fast and easy, find C++ Program Codes