Now this is easy to understand. I dont even have to explain. But i will just incase.
So. These comments are used in most programming languages. NOT all but i said most.
So first of all i will explain the single line comment.
This is simple. It is basicly explained within the name.
The single line comment looks something like this:
// This is a single line comment.
Single line comments end at the end of the line. Comments are TOTALLY ignored by your C++ compiler. Meaning it is not read in as input OR output and will not make a difference in your C++ project.
Why are comments good?
Well comments are good if you stop codingh for a while. Or become lazy and pospone a project you are making. These comments then come in handy to remind you what you were doing. Do NOT comment the hell out of it. Its not normally for what its doing. Its for how it is doing it.
Ok onto the next comment.
A multi line comment.
It looks similar to this:
/*
This
is
a
multi-line
comment.
*/
As you can see this spreads across more than one line. This comment does not stop until you use the closing tag. ( */ ).
It starts with a /* (slash - star). It then ends with a */ (start - star).
That is about it on comments. As i said the are very easy.