难度逐渐上升:
1.函数 double* fun ( int a ); (返回double类型的指针变量
2.函数指针 double* (*p) ( int );
3.函数指针数组 double* (*p [3] ) ( int );
4.指向函数指针数组的指针 double* (*( *p [ 3 ] ) ) ( int );
测试代码:
#include <iostream>
#include <string>
using namespace std;
//创建一个普通函数
double fun(double a)
{
return a;
}
double fun2(double a)
{
return a;
}
void test02()