一个c语言中关于 说明语法错误的问题

来源:百度知道 编辑:UC知道 时间:2024/05/26 20:19:04
#include"stdlib.h"
#include"stdio.h"
struct node
{
int d;
struct node *next;
}

delst(*head,x)

{

struct node *p,*q;
if(head==NULL)
{
printf("Empty list!!!\n\n\n");
return;
}
if((*head->d)==x)
{
p=*head->next;
free(*head);
*head=p;
return;
}
q=lookst(*head,x)
if(q->next==NULL)
{
printf("No this node in the list !!!\n\n\n");
return;
}
p=q->next;
q->next=p->next;
free(p);
return;

}

struct node *lookst(head,x)
{
int x;
struct node *head,*p;
p=head;
while((p->next)!=NULL&&(((p->next)->d)!=x))
p=p->next;
ret

#include"stdlib.h"
#include"stdio.h"
struct node
{
int d;
struct node *next;
};

struct node *lookst(node *head,int x);//着这是函数声明
void delst(node *head,int x)

{

struct node *p,*q;
if(head==NULL)
{
printf("Empty list!!!\n\n\n");
return;
}
if((head->d)==x)
{
p=head->next;
free(head);
head=p;
return;
}
q=lookst(head,x);
if(q->next==NULL)
{
printf("No this node in the list !!!\n\n\n");
return;
}
p=q->next;
q->next=p->next;
free(p);
return;

}

struct node *lookst(node *head,int x)
{
struct node *p;
p=head;
while((p->next)!=NULL&&(((p->next)->d)!=x))
p=p->next;
return(p); <