For example if I have function void f(char, int); and I will call
f('A', 3.1) or f(1.5, 3.1F) what would be the result?
Thanks
If you only have a single function called 'f', no overload is present.
Overload is only there if you have more than one function named 'f':
void f(char, int);
void f(long, double);
int main() {
f(0L, 0.0); // the latter is called
f('c', 42); // the former is called
}
Explaining how overload resolution "works" can take weeks. Please find
a decent C++ book and read the section/chapter on overloading.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Indeed. However, there are some rules that are followed, which are not
that complicated.
Try looking:
http://accu.org/index.php/journals/268