Review of Function Overloading
- A function signature is what the compiler and linker use to uniquely
identify a function.
- In C, functions are identified only by their name.
- In C++, a function's signature includes its name, parameters,
and (for member functions) const. It does NOT include the return type.
We can write functions that swap various kinds of primitive data types
and objects that we define. We still need separate functions,
but they can all have the same name.
void swap (int& a, int& b);
void swap (double& a, double& b);
void swap (Bob& a, Bob& b);
Last Modified: Monday, 28-Aug-2006 10:15:53 EDT