what is the program output/errors
#include<iostream>
using namespace std;
int fun (int x, int y)
{
return x + y;
}
double fun (int x, int y)
{
return x * y;
}
int main()
{
cout<<fun(5, 10);
return 0;
}
The program error is an ambiguating the new declaration of 'double fun(int, int)'.
Where the old declaration 'int fun(int, int)'.
Comments
Leave a comment