????????????C++ class????????????????static??????????nonstatic???????????virtual??????????????????????????в????????????????????????????????????
class A
{
public:
static void staticmember(){cout<<"static"<<endl;}   //static member
void nonstatic(){cout<<"nonstatic"<<endl;}          //nonstatic member
virtual void virtualmember(){cout<<"virtual"<<endl;};//virtual member
};
int main()
{
A a;
//static member????????ú?????????е????????????????static???????????????????A::?????
void (*ptrstatic)()= &A::staticmember;
//nonstatic member ??????ú?????????е??????
void (A::*ptrnonstatic)() = &A::nonstatic;
//?麯?????????麯?????е??????????????????????????????????Ч??
void (A::*ptrvirtual)() = &A::virtualmember;
//???????????
ptrstatic();
(a.*ptrnonstatic)();
(a.*ptrvirtual)();
}