Consider the following, only program body, syntax not correct:
class super
{
func1();//the method which is to be be overridden
}
class sub1 extends super
{
func1();
}
class sub2 extends sub1
{
func1();
}
class Main
{
main()
}
Consider the following, only program body, syntax not correct:
class super
{
func1();//the method which is to be be overridden
}
class sub1 extends super
{
func1();
}
class sub2 extends sub1
{
func1();
}
class Main
{
main()
}
new
or virtual
, depending on your intentions)Multiple Inheritance is the scenario when one class inherits from multiple classes. Wiki
Example: class D derives from both class B1 and class B2
class D : public B1, public B2 {
};
Your example, as itowlson already pointed out, is two levels of single inheritance, which is not same multiple inheritance.