A class D declared as class D : public B is a derived class of the base class B. Every D object contains a B object (its base part) followed by the members D declares, and D has every member function of B. This is inheritance. A D can be used wherever a B is expected: a D * converts to a B * and a D binds to a B &, both pointing at the base part.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Base class, derived class, inheritance?
又称: derived class · base class · inheritance