I would like to know how l can overload a function named void maximum to find the maximum of two integer or two double numbers. When passing one integer and one double number function it should print that double vs int or int vs double. And in this case comparisons are not allowed and user should not be asked for input.?
Asked
Active
Viewed 51 times
-5
-
1Post your current attempt, or show some research effort at least. – nitronoid Apr 22 '17 at 21:53
1 Answers
0
I suggest you subtract one number from another, then check the sign of the result i.e. is it positive, negative or zero, and based on this determine which was larger.

nitronoid
- 1,459
- 11
- 26