有些时候需要函数指针,例如线段树建树时的初始值。
使用方法:
typedef int (*fp)(int); //... fp func;
这样,func(x) 即一个返回 int 的函数。
func(x)
int