(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 19
/ FAQ 19.1
Section 19:
19.1
Is inheritance important to C++?
19.2
When would I use inheritance?
19.3
How do you express inheritance in C++?
19.4
Is it OK to convert a pointer from a derived class to its base class?
19.5
What's the difference between
public
,
private
, and
protected
?
19.6
Why can't my derived class access
private
things from my base class?
19.7
How can I protect derived classes from breaking when I change the internal parts of the base class?
19.8
Protected data vs. private data with protected access functions?
19.9
Okay, so exactly how should I decide whether to build a "
protected
interface"?
[19.1] Is inheritance important to C++?
Yep.
Inheritance is what separates abstract data type (ADT) programming from OO programming.