HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Program notes are explanatory statement, you can include comments in C ++ code, which will improve the readability of source code. All programming languages allow some form of comments.
C ++ supports single-line and multi-line comments. Note that all characters will be ignored by the C ++ compiler.
C ++ comments begin with / * in * / Termination. E.g:
/* 这是注释 */ /* C++ 注释也可以 * 跨行 */
Notes can also start with //, until the end of the line so far. E.g:
#include <iostream> using namespace std; main() { cout << "Hello World"; // 输出 Hello World return 0; }
When the above code is compiled, the compiler will ignore// prints Hello World, will eventually result in the following:
Hello World
In / * and * / inside a comment, // the character has no special meaning. // In the comments, / * and * / characters have no special meaning. Therefore, you can nest another comment in the annotator. E.g:
/* 用于输出 Hello World 的注释 cout << "Hello World"; // 输出 Hello World */