class a{
public:
int a;
double b;
virtual void say()
{
cout<<"hello a"<<endl;
}
void fun()
{
cout<<“fun a”<<endl;
}
};
class b:public a{
public:
void say()
{
cout<<"hello b"<<endl;
}
};
int main()
{
b b1;
a *pa=&b1;
pa->say();//隐式转换
return 0;
}