Comments
A comment is text you add to explain (to yourself or other programmers) why you have done something a particular way in your code. The comment does not make it through the compiler into the program file you actually run—it serves only as documentation.
Comments should not be used to explain everything. Use them to explain the design or why you chose to turn the design into this particular code.
There are two types of comments in C++. The double-slash (//) comment, which is referred to as a C++-style comment, tells the compiler to ignore everything that follows the slashes until the end of the line.
The C-style slash-star (/*) comment mark tells the compiler to ignore everything that follows until it finds a star-slash (*/) comment mark. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access