C程序员的C++指导书(2)
可以使用//来注释一行。这种用法已经加入C99和ANSI C 2000中。
1 using namespace std; // Using the standard library namespace.
2 #include <iostream> // The iostream library is often used.
3
4 int main () // The program's main routine.
5 {
6 double a; // Declaration of variable a.
7
8 a = 456.47;
9 a = a + a * 21.5 / 100; // A calculation.
10
11 cout << a << endl; // Display the content of a.
12
13 return 0; // Program end.
14 }