(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 24
/ FAQ 24.1
Section 24:
24.1
How do you express "
private
inheritance"?
24.2
How are "
private
inheritance" and "composition" similar?
24.3
Which should I prefer: composition or private inheritance?
24.4
Should I pointer-cast from a
private
derived class to its base class?
24.5
How is
protected
inheritance related to
private
inheritance?
24.6
What are the access rules with
private
and
protected
inheritance?
[24.1] How do you express "
private
inheritance"?
When you use
: private
instead of
: public
. E.g.,
class Foo : private Bar { public:
...
};