1.2 — Comments
ALEX
SEPTEMBER 8, 2023
A comment is a programmer-readable note that is inserted directly into the source code of the program. Comments are ignored by the compiler and are for the programmer’s use only.
In C++ there are two different styles of comments, both of which serve the same purpose: to help programmers document the code in some way.
Single-line comments
The // symbol begins a C++ single-line comment, which tells the compiler to ignore everything from the // symbol to the end of the line. For example: