主题:[讨论]Re:事件的问题!关注一下!在线等待
christ115
[专家分:1580] 发布于 2005-03-28 11:36:00
测试了一下
发现NMFtpListItem(AnsiString Listing)这个方法只能为类方法,即只能定义在类中
回复列表 (共1个回复)
沙发
christ115 [专家分:1580] 发布于 2005-03-28 11:52:00
这个是事件函数关键字__closure的说明
The __closure keyword is used to declare a special type of pointer to a member function. In standard C++, the only way to get a pointer to a member function is to use the fully qualified member name, as shown in the following example:
class base
{
public:
void func(int x) { };
};
typedef void (base::* pBaseMember)(int);
int main(int argc, char* argv[])
{
base baseObject;
pBaseMember m = &base::func; // Get pointer to member 'func'
// Call 'func' through the pointer to member
(baseObject.*m)(17);
return 0;
}
指出了a pointer to a member function
我来回复