C-style and C++ style comments : comments « Language Basics « C++ Tutorial






#include <iostream>
 
 int main()
 {
     /* this is a 
     c-style comment */
     
     std::cout << "Hello World!\n";
     // this c++-style comment ends at the end of the line
     std::cout << "That comment ended!";
     return 0;
 }
Hello World!
That comment ended!








1.11.comments
1.11.1.C-style and C++ style comments