#include <stdio.h>
typedef unsigned char uchar;
typedef char *(*T)(int, int);
void f1()
{
printf("helloworld!\n");
}
int f2()
{
printf("helloworld1\n");
}
char *f3(int a, int b)
{
printf("this is f3..\n");
}
int main()
{
int (*pf)(); //定义一个函数指针
char *(*p1)(int, int);
T p2;
//pf = f1; //类型不兼容
pf = f2;
p1 = f3; //p = &f3;
pf(); //通过函数指针调用函数
p1(1, 2);
return 0;
}