When using VC ++, you get the error type "overloaded method only in the inverse type." This is because method / function signatures do not include a return type. I guess this is due to the ambiguity that this can cause if the return value is not assigned to anything. eg,
int iMyvar = object.method (); // obviously, what type should be returned
Contrast with: -
object.method (); // what overload will the compiler cause if the return type was part of the signature? Ambiguos.
source share