两天完成一章需要包括习题。
到五月底结束。
定义类是从结构体开始
struct Point {
int x;
int y;
}
The Point structure from the preceding section is idential to the following class definition:
class Point {
public:
int x;
int y;
}
Fields that are declared in the private section introduced by the keyword private.
Clients instead use methods exported by the class to obtain access to any information the class contains.
In particular, most classes define a constructor that takes no arguments, which is called the default constructor.