OOP: Overview
inheritance : Classes that are linked by inheritance form a hierarchical relationship, usually having a base class at the root of the hierarchy, and other classes inheriting directly or indirectly from the base class, which are derived classes that derive from the class, The base class is responsible for defining members that are common to all classes in a hierarchical relationship, and each derived class defines its own unique members.
virtual functions : In the C + + language, the base class-type-related functions are differentiated from functional relationships in which derived classes do not inherit directly, and for some functions, the base class expects its derived classes to define their own versions, at which point the base class declares these functions as virtual functions.
Base class:
1 class Quote 2 {3 Public : 4 std::stringconst; 5 Virtual Double Const ; 6 };
"C + + Primer the 15th chapter" Object-oriented programming