Programming languages - C++

Back to Course

Lesson Description

Lession - #34 C++ Comments

Program comments are logical explanations that you can remember for the C++ code. These comments help anybody perusing the source code. All programming dialects take into account some type of comments .

C++ language upholds single-line and multi-line comments . All characters accessible inside any comments are overlooked by C++ compiler.

C++ comments start with/* and end with */. For instance −

/* This is a comment */

/* C++ language comments can also
   * span multiple lines


A comment can also start with //, extending to the end of the line. For example −


using namespace std;

{ cout << "Hello World"; // prints Hello World return 0; }


Inside a/* and */comment,//characters have no extraordinary significance. Inside a//comment,/* and */have no extraordinary significance. Subsequently, you can "nest" one sort of comment inside the other kind. For instance −




/* Comment out printing of Hello World:

cout << "Hello World"; // prints Hello World










c++ list is a built-in sequence container that allows non-contiguous memory allocation.








To Solve error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools” You just need to Install Microsoft Visual C++ 14.0.



C++ Primer is a comprehensive book for students who are studying the C++ language.