When I'm trying...
void function(int y,int w)
{
printf("int function");
}
void function(float y,float w)
{
printf("float function");
}
int main()
{
function(1.2,2.2);
return 0;
}
I get an error error like..
error C2668: 'function' : ambiguous call to overloaded function
and when I'm trying to call function(1.2,2) or function(1,2.2) it is printing as "int function"
Please clarify..when will the function(float y,float w)?