Can two classes be simultaneously linked by aggregation and inheritance?
- Moreover, there is a design pattern "Decorator" in which it is used - Andrey NOP
|
1 answer
Sure you may:
class Base { }; class Derived: public Base { Base b; }; int main(int argc, const char * argv[]) { Derived d; } - onewell, why, and suddenly you want cyclic inheritance, but it does not work ... then aggregation comes to the rescue ... - KoVadim
- oneChristmas joke ??? - AR Hovsepyan
- Pattern Decorator! - Andrei NOP
|