#include #include using namespace std; class base { public: virtual void f(int i) const {cout << i << "\n";} //Print in decimal. }; class derived: public base { public: void f(char c) const {cout << "'" << c << "'" << "\n";} //Print a character. }; int main() { derived d; d.f('A'); //Calls derived::f. d.f(66); //I wish it called base::f, but it calls derived::f. return EXIT_SUCCESS; }