转载自:http://www.cppblog.com/shaker/archive/2006/09/01/11924.html
一般的函数指针定义是这样的:
/*****************code begin*****************/
typedef return_type (*fFunctionPoint) ( ... );
/*****************code end******************/
类成员函数是不能被转化成类似上例中的fFunctionPoint类型的.
定义指向类成员函数的指针类型,如下:
/*****************code begin*****************/
typedef return_type (class_name::*fMemberFunctionPoint) ( ... );
/*****************code end******************/
调用的时候使用
/*****************code begin*****************/
class_name* Object;
fMemberFunctionPoint MemberFunc;
((*Object).*(MemberFunc))( ... );
/*****************code end******************/