When would you use private inheritance?

When would you use private inheritance?

Many uses of Private Inheritance : 
> It can introduce unnecessary multiple inheritance .
> It allows members of Car to convert a Car* to an Engine*.
> It allows access to the protected members of the base class.
> It allows Car to override Engine's virtual functions.
> This makes it slightly simpler to give Car a start() method that simply calls through to the Engine's start() method.

By:Umang
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher