class Base { public: void print() { // code } }; class Derived : public Base { public: void print() { // code } };