1. In public Succession: (1). The derived class object stores the private members of the base class (2). A derived class object can use a method of the base class (3). A base class reference can reference a derived class object, and a derived class reference can not reference a base class object
2. When a base class reference refers to a derived class object: The function used by the Destructors class reference is a virtual function, then the function used is a derived class virtual function. The base class function is used when it is not a virtual function.
3. A function needs to behave differently in a derived class and must be declared as a virtual function (a virtual function declared by a base class, which is also a virtual function in a derived class, even if the virtual keyword is no longer used.) )
4. Pure virtual function means: I am an abstract class! Don't instantiate me! Pure virtual functions are used to standardize the behavior of derived classes, which are actually called "interfaces". It tells the user that my derived class will have this function.
5. Constructors cannot be virtual
6. A destructor for a base class must be virtual
C + + Focus with mind