< Prev
Next >

C++ Hybrid Inheritance

In our previous article, we introduced you to different types of inheritance - single, multiple, multilevel inheritance. Today we are going to discuss the another type of inheritance in C++ named - hybrid inheritance. Hybrid inheritance is performed when we have to mix different types of inheritance within a single program, for example, mixing single inheritance with multiple inheritance or multiple inheritance within a single program.

The class at the topmost-level is known as base class and the classes that inherit the features of the class at the topmost-level is called subclasses or derived classes,

What features a subclass inherits from its base class, through inheritance?

Note - Base class members marked with private visibility mode are never inherited.

Rules of inheritance -

Depending on the value of visibility-mode, multiple inheritance can be performed in various ways -


Please Subscribe

Please subscribe to our social media channels for daily updates.

Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page



Please check our latest addition