#include<stdio.h>
#include<malloc.h>
struct SqList
{
int value;
struct SqList *next;
};
struct SqList *createLink()
{
struct SqList *L;
void create(struct SqList *);
void showData(struct SqList *);
L = (struct SqList *)malloc(sizeof(struct SqList));
create(L);
//showData(L);
return L;
}
void showData(struct SqList *L)
{
struct SqList *p;
p=L->next;
printf("打印信息");
while(p)
{
printf("%d ",p->value);
p=p->next;
}
}
void create(struct SqList *L){
int temp;
struct SqList *newL;
L->next=NULL;
printf("输入节点的值(输入0结束)\n");
scanf("%d",&temp);
while(temp!=0)
{
newL = (struct SqList *)malloc(sizeof(struct SqList));
newL->value=temp;
newL->next=L->next;
L->next=newL;
scanf("%d",&temp);
}
}