[求助]前插结点
stuct slist{int data;
strct slist *next;
};
typedef struct slist SLIST;
insert_snode(SLIST *head,int x,int y)
{SLIST *s,*p,*q;
s=(SLIST*)malloc(sizeof(SLIST));
s->data=y;
q=head; p=head->next;
while((p!='\0')&&(p->data!=x))
{q=p;p=p->next;} /*这个不太懂啊*/
s->next=p; q->next=s;
}