C++ Inheritance

Inheritance :-   
the concept of reusability is adopted by the C++ using Inheritance.
Once a class is. The process of reusing the properties of the existing class by another class, is
called the Inheritance.

Type of Inheritance :-
(i) Single Inheritance
(ii) Multiple Inheritance
(iii) Multilevel Inheritance
(iv) Hierarchical Inheritance
(v) Hybrid Inheritance

Derived Classes :-
A Derived class have their relationship with the base class in addition
to its own details.

Example of class :-
class a : private z
{
member of class a;
}
class b : public z
{
member of a;
}
class a : z
{
member of z;
}

inheritance in C++

 

Example of inheritance




Follow Us

Contact Us

tutorialworldin@yahoo.com

Back to Top