Overloading¶
Functions in C¶
In C, everything is simple
A function has a name
The name is the only thing by which functions are distinguished
Not the return type, nor the paraameters
Declaration of
x
¶int x(int i);
Ok¶
int ret = x(42);
2x Error¶
char *ret = x("huh?");
Error:
x
declared twice¶char *x(char* str);