Answer Posted / mukesh kumar
To Remove the ambguity problem in multiple inheritance we
make the base class as vitual that means it will make only
one copy its common data member.
EX: suppose we have a base class A , which have a data
member x as integer.
class b: virtual public A
{
};
class C : virtual public A
{
};
class d: public B,public C
{
}
without making classes A and B as virtual class d had two
copies of x.This will arised ambguity problem.
Is This Answer Correct ? | 38 Yes | 4 No |
Post New Answer View All Answers
Which is the best c++ compiler?
What are formatting flags in ios class?
What is a string example?
What is abstraction and encapsulation?
How one would use switch in a program?
What is binary object model?
What is null c++?
Which operations are permitted on pointers?
What is bubble sort c++?
Explain the difference between abstract class and interface in c++?
What is Coupling?
Difference between overloaded functions and overridden functions
What is class in oop with example?
What do you mean by overloading?
What is inheritance write a program to show use of inheritance?