Types of Comments in C++
In C++ there are two types of comments :
- Single-line comment
- Multi-line comment
C++ Comments
Comments in C++ are meant to explain the code as well as to make it more readable. When testing alternative code, it can also be used to prevent execution. The purpose of the comments is to provide information about code lines. Programmers commonly use comments to document their work.