函数声明一般是这样: int fun(int, double); 对应函数指针(pointer to function)的声明是这样: int (*pf)(int, double); 可以这样使用: pf = &fun; ? ?
基于4个网页-相关网页
cast and pointer to function 强制和指向函数的指针
pointer to member function 成员函数指针 ; 成员函数指标 ; 成员函式指标 ; 成员指标
and pointer to function 和指向函数的指针
An array is converted to a pointer to the type of the array; a function is converted to the appropriate pointer to function type.
将数组转换为指向数组类型的指针,将函数转换为指向函数类型的适当指针。
It returns a pointer to the function, which can then be used like any other reference value.
它返回一个函数指针,可以像任何其他引用值一样使用它们。
The code passes the target as the first argument and a pointer to the code function as the second. The syntax for this is.
这段代码将目标作为第一个参数,将一个代码函数的指针作为第二个参数进行传递。
应用推荐