// File: over5.cpp // // Don't use obscure rules in resolving // function overloads to determine // the correctness of your program. #include using namespace std ; void PrintMe (char c) { cout << "char c = " << c << endl ; } void PrintMe (unsigned short k) { cout << "unsigned short k = " << k << endl ; } void PrintMe (short k) { cout << "short k = " << k << endl ; } void PrintMe (int i) { cout << "int i = " << i << endl ; } void PrintMe (float x) { cout << "float x = " << x << endl ; } int main() { unsigned char c = 'a' ; cout << "Some sizes:" << endl ; cout << "sizeof(char) = " << sizeof(char) << endl; cout << "sizeof(short) = " << sizeof(short) << endl; cout << "sizeof(int) = " << sizeof(int) << endl; cout << endl ; // Which function will actually be called? PrintMe(c) ; }