标签:blog http 2014 art linux io
#include<stdio.h> #include<stdlib.h> struct test { char name[20]; void (*func)(char *); }; void tttfunc(char *name) { printf("current is %d\n",__LINE__); printf("%s\n",name); } int main() { struct test ttt= { .name = "zhang", .func = tttfunc, }; ttt.func(ttt.name); return 0; }
linux内核中驱动开发常见的相似多态,布布扣,bubuko.com
标签:blog http 2014 art linux io
原文地址:http://www.cnblogs.com/mfrbuaa/p/3825406.html