Write a syntax for Hybrid Inheritance in Cpp?
1 Answers
Syntax For Hybrid Inheritance
class AÂ Â Â Â Â Â Â Â // grandparent
{
……
……
};
class B1 : public AÂ Â Â Â Â Â Â Â Â Â Â Â Â //parent 1
{
…….
……
};
class B2 : public AÂ Â Â Â Â Â Â Â Â Â Â Â Â Â //parent 2
{
……
……
};
class C : public B1,public B2Â Â //child
{
…… //inherits public functions from class A,B1 and B2
};