Get premium membership and access questions with answers, video lessons as well as revision papers.

Why are the following two overloaded functions in C++ inherently ambiguous? int f(int a); int f(int &a);

      

Why are the following two overloaded functions in C++ inherently ambiguous?
int f(int a);
int f(int &a);

  

Answers


Davis
The syntax for calling a function that takes a reference parameter is identical to the syntax for calling a function that takes a value parameter.
Githiari answered the question on February 5, 2018 at 07:44


Next: When you are assigning the address of an overloaded function to a pointer in a program,what is it that determines which version of the function...
Previous: When a base class is inherited as public by the derived class, what happens to its public members?What happens to its private members? If...

View More Computer Studies Questions and Answers | Return to Questions Index


Learn High School English on YouTube

Related Questions