0% found this document useful (0 votes)
91 views6 pages

Resolving Multiple Inheritance Ambiguity

Multiple inheritance allows a derived class to inherit from multiple base classes, but this can cause ambiguity when the derived class inherits the same member from both base classes. The solution is to explicitly specify which base class member to use by qualifying it with the base class name when accessing it in the derived class.

Uploaded by

supriya028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views6 pages

Resolving Multiple Inheritance Ambiguity

Multiple inheritance allows a derived class to inherit from multiple base classes, but this can cause ambiguity when the derived class inherits the same member from both base classes. The solution is to explicitly specify which base class member to use by qualifying it with the base class name when accessing it in the derived class.

Uploaded by

supriya028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Ambiguity in multiple

inheritance and it’s solution

Vandana
Roll.no: 28
Multiple Inheritance and it’s
Ambiguity

Base Class 1 Base Class 2

Derived Class
PROGRAM OUTPUT
ERROR
SOLUTION
OUTPUT

You might also like