首页 > 系统服务 > 详细

linux内核中驱动开发常见的相似多态

时间:2014-07-06 15:44:30      阅读:405      评论:0      收藏:0      [点我收藏+]
#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;
}
bubuko.com,布布扣

linux内核中驱动开发常见的相似多态,布布扣,bubuko.com

linux内核中驱动开发常见的相似多态

原文:http://www.cnblogs.com/mfrbuaa/p/3825406.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!