_ [01] >

Overloading Functions

C++ allows multiple functions to have the same name:

void PrintMe (string s) { cout << "string s = \"" << s << "\"" << endl ; } void PrintMe (int i) { cout << "int i = " << i << endl ; } void PrintMe (string s, int i) { cout << s << " " << i << endl ; }