摘要:
Consider: class B { public: void mf(); // ... }; class D : public B { /*...*/ }; D x; // x is an object of type D B *pB = &x; // get pointer to x pB-> 阅读全文
摘要:
The Template Method Pattern via the Non-Virtual Interface Idiom: class GameCharacter { public: int healthValue() const // derived classes do not redef 阅读全文
摘要:
The seemingly straightforward notion of (public) inheritance turns out, upon closer examination, to be composed of two separable parts: inheritance of 阅读全文