Chinaunix首页 | 论坛 | 博客
  • 博客访问: 259580
  • 博文数量: 52
  • 博客积分: 406
  • 博客等级: 一等列兵
  • 技术积分: 549
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-21 12:34
个人简介

......

文章分类

全部博文(52)

文章存档

2014年(1)

2013年(32)

2012年(19)

我的朋友

分类: LINUX

2012-06-05 14:47:27


 

点击(此处)折叠或打开

  1. struct name
  2. {
  3.     char * liubbc;
  4.     struct name *next;
  5.     
  6. }
  7. struct raw_name
  8. {
  9.     struct name *head;
  10. }

  11. struct raw_name netdev_chain ;
  12. netdev_chain.head = NULL;

  13. void func(struct name **a, struct name *node)
  14. {
  15.     while((*a)!= NULL)
  16.     {
  17.         a = &((*a)->next);/*(*a)->next 取的是next指针本身的地址而不是指针值NULL*/
  18.     }
  19.     
  20.     node->next = *a;
  21.     *a = node;
  22. }


 

阅读(1200) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~