C++ supports single-line and multiline comments. A single-line comment is represented by two forward slashes //
.
// a single line comment
int x = 99; // comment after a variable
A multiline comment is represented by a forward slash and asterisk /* */
.
/*
This is a
multiline comment.
*/
int x = 99;
Gavin Wiggins © 2024.
Made on a Mac with Genja. Hosted on GitHub Pages.