virtual void func(int num){cout << "base: " << num << endl;}
};
class derived : public base
{
public:
void func(const char* str){cout << "derived: " << str << endl;}
void func(int num){cout << "derived: " << num << endl;}
void func(){cout << "the function is in derived!" << endl;}
};
int main()
{
base *pb;
derived objd;
pb = objd;
pb->func(11);
pb->func("hello");
// pb->func();
getchar();
return 0;
}