How can a call to an overloaded function be ambiguous? - Study24x7
Social learning Network
22 Jul 2022 09:46 AM study24x7 study24x7

How can a call to an overloaded function be ambiguous?

study24x7
Write a comment
  • Dev kumar

  • · The call to an overloaded function may not be evident if two or more functions share the same name and function signature.
    Explanation:
    When the compiler is unable to choose which of the overloaded functions should be invoked first, function overloading ambiguity takes place.
    A compiler will not run a programme if it finds an ambiguity mistake.
    The function call operator () can be overloaded for objects of class type.
    When you overload a function, you are not creating a new method of calling it ().
    Instead, you're creating a function called an operator that can accept any number of arguments.

    See more

    Related Questions
    500+   more Questions to answer