Ambiguity in Inheritance

When both the class, a base class and a derived class contains same name method, it creates a problem for the object of derived class to access method by name or parameters. Object will have multiple definitions to call for the same¬†method by name. This problem could be seen in any type of¬†inheritance. It is called ambiguity in inheritance. Look at the example: Here, x1 and x2 will call method of derived class by default. What if you want to access the base class method? C++ provided you a solution…

Read More