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

Why it is called runtime polymorphism?

677


What is abstraction with example?

712


How Do you Code Composition and Aggregation in C++ ?

24419


Why is object oriented programming so hard?

706


What is overriding vs overloading?

670






What is the purpose of enum?

658


What are different oops concepts?

669


officer say me - i am offered to a smoking , then what can you say

1683


Advantage and disadvantage of routing in telecom sector

872


Why is there no multiple inheritance?

643


What is coupling in oops?

698


What is the important feature of inheritance?

728


Which method cannot be overridden?

662


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

759


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1242