I understand that the overloading a function is legal if the number of parameters are different, or if the parameter type is different.
Why is it that a difference of only the return type is not legal?
Also, is it legal to overload as such:
int hello(int x);
int hello(int &z);
also
int hi(int x);
int hi(int *z);