Class member
类相关构成
- Attributes
- Functions
- Constructors
- Copy constructors
- Move constructors
- Destructors
作用域修饰符
- public
- private(default)
- protected
- 可以供继承对象使用
Constructors & Destructors
constructors 可以被复写(overload)
class Player{
private:
int name;
int xp;
public:
Player(); // Constructors
Player(string, int); // Overload Constructors
~Player()