typedef 函数指针


#include <stdio.h> typedef int (*Fp)(); //定义了一个返回值为int *的函数指针FP,参数为空 int test(){ printf("%s\n", __FILE__); } int main() { Fp fp = test; fp(); return 0; }

 

带参数

 

不带参数

posted @ 2019-10-08 09:18  Linux_xl  阅读(311)  评论(0)    收藏  举报