How can a call to an overloaded function be ambiguous? - Study24x7
Social learning Network

Warning: include(./views/auth.php): failed to open stream: Permission denied in /var/www/html/live/loginRightSlider.php on line 18

Warning: include(): Failed opening './views/auth.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/live/loginRightSlider.php on line 18

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/live/makepost.php on line 52
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