2019年10月31日

关于C语言中的结构体内嵌函数(转)

摘要: https://blog.csdn.net/qq_39490500/article/details/80457831 看门见山 1.内嵌函数定义举例:经过真实测试 在函数中声明定义结构体 #include "fun_in_struct.h" int main(int argc, char **arg 阅读全文

posted @ 2019-10-31 19:17 xihong 阅读(1195) 评论(0) 推荐(0) 编辑

为结构体中函数指针赋值的两种方法(转)

摘要: /** * 为结构体中的指针数组赋值 */ #include <stdio.h> typedef struct test{ void (*p)(void); void (*q)(void); void (*y)(void);}test; void f1(void){ printf("f1\n");} 阅读全文

posted @ 2019-10-31 18:46 xihong 阅读(2175) 评论(0) 推荐(0) 编辑

导航