What is ambiguity in c++
Answers were Sorted based on User's Feedback
Answer / neha yadav
ambiguity means "confusion" and "two means"
ambiguity is created in data function overloading and multiple inheritance.
Is This Answer Correct ? | 41 Yes | 5 No |
Answer / 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 |
Answer / philemon
ambiguity is a compile error which occurs when multiple base classes are inherited
Is This Answer Correct ? | 3 Yes | 3 No |
officer say me - i am offered to a smoking , then what can you say
define oops concept with example
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
How to calculate the age from the date of birth by using the program?
write a program for function overloading?
14 Answers HCL, InfoCity, TATA,
How to call a non virtual function in the derived class by using base class pointer
Write a program to reverse a string using recursive function?
what is the difference between javap and jad utility
What are classes oop?
what is the difference between containership and inheritence?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
What is the difference between class and object?