Because functions can be called without assigning their return value to some variable. If we have
int foo();
and
double foo();
and call it just like
foo();
compiler won't know which overload to call.
int foo();
and
double foo();
and call it just like
foo();
compiler won't know which overload to call.
No comments:
Post a Comment