how to make a comment in c++

// This is a single-line comment in C++.

/*
  This is a multi-line comment in C++.
  It can span multiple lines.
*/

// Code example with comments:

#include <iostream>

int main() {
    // Print a message to the console
    std::cout << "Hello, World!" << std::endl;

    /*
      This is a multi-line comment within the main function.
      It provides additional information about the code.
    */

    return 0;
}