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
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
Is sorted c++?
What is the latest c++ standard?
What is a virtual function in C++?
How do you traverse a btree in backward in-order?
What are the major differences between C and C++?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Explain the importance of method overloading in C++?
Tell me about virtual function
What is copy constructor? Can we make copy constructor private in c++?
Can comments be nested?
Is c++ a software?
What is a v-table?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
What is polymorphism what is it for and how is it used?