1、函数的地址:
存储其机器语言代码的内存开始的地址。
2、获取函数指针的方法:
通过函数名。
3、声明函数指针:
double (*pf) (int);
该函数有一个int型参数,返回double。pf是函数指针。
4、声明函数原型:
double funtion (int);
double (*pf) (int);
pf=function;
4、函数指针使用示例
void estimate(int lines, double (*pf)(int)); //使用函数指针做形参
double funtion (int);//使用指针调用函数
double (*pf) (int);
pf=function;
double x=funtion(4);//三种等效的函数调用方式
double y=(*pf)(4)
double z=pf(4)