class A{
public:
virtual void fun(){
cout<<"base ";
}
};
class B: public A{
public:
void fun(){
cout<<"derived ";
}
};
int main(){
A *a=new B;
a->fun();
return 0;
}