RAD Studio |  |

E2335: Overloaded 'function name' ambiguous in this context (C++)

The only time an overloaded function name can be used or assigned without actually calling the function is when a variable or parameter of the correct function pointer type is initialized or assigned the address of the overload function.

In this case, an overloaded function name has been used in some other context, for example, the following code will generate this error:

Copy Code

    class A{
       A(){myex;}           //calling the function
       void myex(int) {}    //or taking its address?
       void myex(float){}
    };

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!