双链表插入函数.docVIP

  • 1
  • 0
  • 约1.98千字
  • 约 2页
  • 2018-05-22 发布于河南
  • 举报
双链表插入函数

#include stdio.h #define NULL 0 /*?¨???§éú3é?¨μ??á11??àà?í*/ typedef struct student { int id; char name[20]; int classes; float score[4]; }elemtype; /*?¨????á′±í?áμ?μ??á11??àà?í*/ struct node { elemtype data; struct node *prior, *next; }; /*3?ê??ˉ??á′±í£?′′?¨í·?áμ?*/ void initiatelist ( struct node ** h ) { *h = (struct node *) malloc (sizeof (struct node) ); (*h)-prior = NULL; (*h)-next = NULL; } void insert( struct node **pc, int *pn, int i, elemtype x ) /*2?ê?pc????current_node£?pn????current_no£?i?a2?è?????£?x?a??ê???*/ { struct node *t; /*ó?óú????′′?

文档评论(0)

1亿VIP精品文档

相关文档