Data abstraction, inheritance, dynamic binding
(1) in C + +, dynamic binding occurs when a virtual function is called through a pointer or reference to a base class, either to a base class object or to a derived class object
This fact is the key to dynamic binding. A virtual function called with a reference or pointer determines at run time that the called function is the object referred to by the reference or pointer
The actual type.
(2) Any non-static member function can be a virtual function, virtual function virtual Word can only appear in the class body
Access control:
(1) Private member: The private member of the base class can only be accessed by the member functions and friends of the base class.
(2) A derived class can access only public members of the base class and cannot access private (access rights are the same as other programs)
(3) Protected members: derived classes can be accessed, but other ordinary users are still inaccessible.
15.1--Object-oriented