CodeClerks

What is hybrid inheritance in c++ ??



Write the reason you're deleting this FAQ

What is hybrid inheritance in c++ ??

Hybrid inheritance is a combination of multiple inheritance and multilevel inheritance. A class is derived from two classes as in multiple inheritance(Multiple Inheritance is a feature of C++ where a class can inherit from more than one classes. The constructors of inherited classes are called in the same order in which they are inherited) . However, one of the parent classes is not a base class. It is a derived class. Lets check out a C++ program of Hybrid Inheritance...

#include  
using namespace std;
class mm
{
protected:
int rollno;
public:
void get_num(int a)
{ rollno = a; }
void put_num()
{ cout

Comments

Please login or sign up to leave a comment

Join
simicartan
I think Hybrid inheritance is a combination of multiple inheritance and multilevel inheritance. A class is derived from two classes as in multiple inheritance. However, one of the parent classes is not a base class.


App Marketing Made Easy



Are you sure you want to delete this post?