0 votes
in C Plus Plus by
What are the Comments in C++?

1 Answer

0 votes
by
Comments in C++ are simply a piece of source code ignored by the compiler. They are only helpful for a programmer to add a description or additional information about their source code.

In C++ there are two ways to add comments:

//single-line comment

/* block comment */

The first type will discard everything after the compiler encounters “//”. In the second type, the compiler discards everything between “/*” and “*/”.

Variables, Data Types, And Constants

Related questions

+1 vote
0 votes
asked Jun 18, 2020 in C Plus Plus by Robindeniel
0 votes
asked Jun 15, 2020 in C Plus Plus by Robindeniel
...