Prev article
Newer
Next article
Older
See also:
class CDog : public CMammal { };
A dog is a mammal.
class CCar : protected CAccelerator, protected CBrake, protected CClutch { };
A car is implemented using an accelerator, a brake, a clutch, etc., and we DO want to expose these subcomponents to subclasses of car.
class CCar : private CAccelerator, private CBrake, private CClutch { };
A car is implemented using an accelerator, a brake, a clutch, etc., and we DON'T want to expose these subcomponents to subclasses of car.
Ads by Google
© Richard McGrath