void sum(int x);
void sum(float x);
I don't understand why these function overloading statements create below error for sum(2.3)
:
call of overloaded
sum(double)
is ambiguous
But for the below two function overloading, it works well.
void sum(int x);
void sum(double x);