#include <iostream> using namespace std; intmain () { cout << " hello world << endl " ; // output text system( " pause " ); // easy to observe the result return 0 ; }
// sign bit comment
/* */ Multi-line comments appear in pairs, if there are multiple lines of comments between /* */, it is easy to make mistakes
#if #endif Use the features of C++ code to comment with preprocessing
#include <iostream> using namespace std; intmain () { cout << " hello world << endl " ; // output text #if 0 cout << " hello world << endl " ; // output text cout << " hello world << endl " ; // output text cout << " hello world << endl " ; // output text cout < < " hello world << endl " ; // output text #endif system( " pause " ); // Easy to observe the result return 0 ; }