Use public base classes only when polymorphism is important, and the derived class is used through a pointer or reference to the base class.
Use a private or protected base when behavior is going to be inherited: polymorphism is not needed, but you want to use the class as a base internally, or the base will be called from within a framework. This is like public inheritance, but only visible to your own class or to a framework.
Use a member when behavior is only going to be used, and when your class is a client of
that behavior.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker