#include "iostream.h"
class Test
{
private:
int m_nCount;
public:
Test()
{
m_nCount = 0;
}
void Change()
{
m_nCount++;
cout << "nCount = " << m_nCount << endl;
}
};
//定义了一类函数指针
typedef void (Test::*AFX_PFN)(void);
int main()
{
Test t;
AFX_PFN pfn;
pfn = &Test::Change;
(t.*pfn)();
return 0;
}