求问 哪里错了 大概是if那块
int delete(slink *head, ElemType *e)
{
slink *p, *q;
int n;
int k;
//¼ì²éiµÄºÏ·¨ÐÔ
for( q=head,k=0;k<getlen(head);k++){
if(head->data[k]<6 && head->data[k]>3)
{q=p->next;}
p->next=q->next;
*e=q->data;
free(q);
}
return 1;
}
int delete(slink *head, ElemType *e)
{
slink *p, *q;
int n;
int k;
//¼ì²éiµÄºÏ·¨ÐÔ
for( q=head,k=0;k<getlen(head);k++){
if(head->data[k]<6 && head->data[k]>3)
{q=p->next;}
p->next=q->next;
*e=q->data;
free(q);
}
return 1;
}
2015-12-16
举报