You can select one or more lines of code, right-click, and click Comment to add the leading characters // to the beginning of lines. When you uncomment lines of code, the leading // characters are removed from the selected lines.
Tip: The characters /* */ on lines that already are already commented out, are not affected when you comment and uncomment code.
Content Assist and code completion
Customizing the C++ editor
Commenting out code
C/C++ editor, code templates and search
preferences