Advertisement



< 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 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 multilevel inheritance within a single program.

Note: The class at the topmost-level is known as base class and the class that inherit the features of a class at the topmost-level is called subclass or derived class.




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, inheritance can be performed in various ways -




Advertisement




Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement