typedef struct node
{
int data ;
struct node *next;
}Node,*Link;
void InsertData(Link L, int x)
{
NOde s=(node *)malloc(sizeof(Node));
s->data=x;
s->next=L;
L=s;
}
void DeleteData(Link L,int x)
{
Link pre=NULL,p=L;
while(p!=NULL)
{
if(p->data=x)
break;
else
{
pre=p;
p=p->next;
}
}
if(p==NULL)
printf("要删除的数据不存在");
else if (p==L)
{
L=L->next;
delete(p);
}
else
{
pre->next=p->next;
delet(p);
}
}
LinkList p;
LinkList s;
int j;
p = L;
j = 0;
if (i==0){
p = L;
}
else
if (i==1){
L = p->next;
free(p);
}
else{
while(j
j++;
}
s = p->next;
p->next = s->next;
}
}