What is ambiguity in c++

Answer Posted / h4ck3r

In multiple inheritance, there may be possibility that a class may inherit member functions with same name from two or more base classes and the derived class may not have functions with same name as those of its base classes. If the object of the derived class need to access one of the same named member function of the base classes then it result in ambiguity as it is not clear to the compiler which base’s class member function should be invoked. The ambiguity simply means the state when the compiler confused.

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an interface in oop?

589


c++ program to swap the objects of two different classes

1752


Write a program to reverse a string using recursive function?

1784


2. Give the different notations for the class.\

1582


Which type does string inherit from?

608






Why do we use polymorphism in oops?

573


write a program that takes input in digits and display the result in words from 1 to 1000

1980


What is oops?what is its use in software engineering?

553


What is encapsulation with example?

570


What is polymorphism explain its types?

672


What is purpose of inheritance?

638


class type to basic type conversion

1833


Write a c++ program to display pass and fail for three student using static member function

2802


What is meant by multiple inheritance?

729


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

1999