#include
using std::cout;
using std::endl;
double larger(double a, double b);
long larger(const long& a, const long& b);
int main() {
double a_double = 1.5, b_double = 2.5;
cout << larger(a_double, b_double) << endl;
int a_int = 15, b_int = 25;
cout << larger(static_cast(a_int), static_cast(b_int))<< endl;
return 0;
}
double larger(double a, double b) {
cout << "double larger() called" << endl;
return a>b ? a : b;
}
long larger(const long& a, const long& b) {
cout << "long ref larger() called" << endl;
return a>b ? a : b;
}
double larger() called
2.5
long ref larger() called
25