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
Why it is called runtime polymorphism?
What is abstraction with example?
How Do you Code Composition and Aggregation in C++ ?
Why is object oriented programming so hard?
What is overriding vs overloading?
What is the purpose of enum?
What are different oops concepts?
officer say me - i am offered to a smoking , then what can you say
Advantage and disadvantage of routing in telecom sector
Why is there no multiple inheritance?
What is coupling in oops?
What is the important feature of inheritance?
Which method cannot be overridden?
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.
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?