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
How should runtime errors be handled in c++?
an integer constant must have atleast one a) character b) digit c) decimal point
What is object and example?
What is the best c++ ide?
What is difference between data abstraction and encapsulation?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
What is a list c++?
What is the main purpose of c++?
What is the full form of dos?
How many static variables are created if you put one static member into a template class definition?
Explain method of creating object in C++ ?
Do you know the use of vtable?
Explain the difference between c & c++?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is virtual base class?