Comments

December 13, 2022

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;

C++ Programs © 2023
Built by Gavin Wiggins