弱弱的问问:
#include <iostream>
using namespace std;
class Parent
{
public:
void P() {cout<<"Parent::P()"<<endl;}
};
class Child:public Parent
{
public:
void C() {cout<<"Child::C()"<<endl;}
};
void main()
{
Child *c=new Child;
Parent *p=c;
Child *d=(Child *)c;
//同时调用的时候为啥引起杀毒软件的注意
d->P();
d->C();
}