正在加载图片...
(1)初始化双向循环链表DL int InitDuList(DU LINK LIST&Dl) DL->head=DU NODE )malloc(sizeof(DU NODE); / 为头结点分配存储单元 if DL->head==nUll) return ERROR; DL-head->next=DL->head ∥让头结点的next域指向自身 DL-shead->prior=DL->head ∥头结点的 prior域指向自身 return OK: 请单赤鼠标左键换页!(1)初始化双向循环链表DL int InitDuList(DU_LINK_LIST *DL) { DL->head=(DU_NODE*)malloc(sizeof(DU_NODE)); // 为头结点分配存储单元 if (DL->head==NULL) return ERROR; DL->head->next=DL->head; //让头结点的next域指向自身 DL->head->prior=DL->head; //让头结点的prior域指向自身 return OK; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有