在传统的 C++ 中,可以使用函数指针变量来传递函数。例如,以下类型别名指定了一个指向函数的指针,该函数将 float* 转换为 int:
float*
int
typedef int (*PTPFTOI)(float*);