+ 1
Can function outputs be overloaded?
3 Respuestas
+ 6
C# have output parameters, I am not entirely sure if C++ has that since I dont use those.
Also, you cant have create 2 variable with names anyway
+ 5
As long as you also change at least one parameter (or add or remove), you can do it.
Example:
int sum(int x, int y) -> our normal function which returns an int.
double sum(double x, double y) -> overloaded function which returns a double and takes two double parameters instead of two ints.
0
I remeber a lesson in sololearn, where it says that outputs cannot be overloaded