摘要:
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-> 阅读全文
posted @ 2021-09-28 20:49
MyCPlusPlus
阅读(55)
评论(0)
推荐(0)
摘要:
The Template Method Pattern via the Non-Virtual Interface Idiom: class GameCharacter { public: int healthValue() const // derived classes do not redef 阅读全文
posted @ 2021-09-28 20:34
MyCPlusPlus
阅读(188)
评论(0)
推荐(0)
摘要:
The seemingly straightforward notion of (public) inheritance turns out, upon closer examination, to be composed of two separable parts: inheritance of 阅读全文
posted @ 2021-09-28 11:35
MyCPlusPlus
阅读(56)
评论(0)
推荐(0)

浙公网安备 33010602011771号