In C++, comments are used to provide explanations or notes in the code. They are not executed by the compiler and are ignored during program execution. There are two types of comments in C++:
1. Single-line comments: These start with two forward slashes (`//`) and continue until the end of the line.
2. Multi-line comments: These start with a `/*` and end with a `*/`. They can span multiple lines.
Here's an example of both types of comments in C++:
```cpp
#include