结构体内嵌函数指针
#include<stdio.h> void say(int age) { printf("我%d岁了\n",age); } struct student { int age; char name[10]; int isman; void (*say)(int age); }; void init(struct student *app) { app->say=say; } void main() { struct student zhangsan; init(&zhangsan); zhangsan.age=10; zhangsan.isman=1; zhangsan.say(zhangsan.age); }