class A { public: Bool func(B*) { return True; } }; typedef Bool (A::* pHandle)(B*); class B { public: pHandle func; }; class C:A { public: void DD() { B* pB = new B; ....... pHandle handleFunc = pB->func; (this->*handleFunc)(pB);//????疑问在此处 } }
求大神解释下此处的用法,实在感觉诡异
指向成员的指针。
http://stackoverflow.com/questions/670734/c-pointer-to-class-data-member