内容发布更新时间 : 2024/11/15 11:03:21星期一 下面是文章的全部内容请认真阅读。
q=p; p=p->next; } if(p==q) {
t->next=p; h=t; } else {
t->next=p; q->next=t; } } p=h;
while(p!=NULL) { i++; p->order=i; p=p->next; }
printf(\ return h; }
/*index by number*/ STUDENT *index(STUDENT *h) {
STUDENT *p,*q,*t,*h1; h1=h->next; h->next=NULL; while(h1!=NULL) { t=h1; h1=h1->next; p=h; q=h;
while(strcmp(t->no,p->no)>0&&p!=NULL) { q=p; p=p->next; }
if(p==q) {
t->next=p; h=t; }
else {
t->next=p; q->next=t; } }
printf(\ return h; }