int add(int a,int b) { cout<<"1"<<endl; return a+b; } int add(int a,char c) { cout<<"2"<<endl; return a+c; } int main() { cout<<add(10,20)<<endl;
in the above code, the first function calls the add (int, int) function, the second function calls the add (int, char) function. The third function call should occur as an error, but it calls the add (int, char) function. can someone explain why.
source share