. Single-line comments start with two forward slashes (//).

Single-line Comment in C++

// This is a single-line comment in C++
  • The double forward slashes // indicate the start of a single-line comment in C++.
  • Any text following the // on the same line is treated as a comment and is ignored by the compiler during the compilation process.