线性表-链式

来源:互联网 发布:linux gz解压命令 编辑:程序博客网 时间:2024/05/17 22:59

c语言:

#include <cstdio>typedef int  ElemType;struct Node{ElemType data;Node *next;};void Create(Node *LNode,int length){Node *p;for (int i = 0; i < length; i++){p = (Node*)malloc(sizeof(LNode));p->next = LNode->next;LNode->next = p;}}void Insert(Node *LNode, ElemType e){}int main(void){Node Head;Head.next = NULL;Head.data = 1;Create(&Head, 5);}


0 0