CPP Language / Inheritance and its TypesIt means acquiring the properties of Super / parent / Base /Root class by Derived /sub / child / leaf class.Types of Inheritance 1. Single inheritance. 2. Multiple inheritance. 3. Hierarchical inheritance. 4. Multilevel inheritance. 5. Hybrid inheritance. Inheritance Access specifiers
Single Inheritance (A<--- B)
Multilevel Inheritance (A<--- B<---C)
Multiple Inheritance (A<---C, B<---C)
Hierarchical Inherit Inheritance (A<---B, A<---C)
Hybrid Inheritance It is a combination of more than one type of inheritance. Example, A child and parent class relationship that follows multiple and hierarchical inheritance . |