C语言大神们关于链表的问题

2025-06-26 15:48:55
推荐回答(1个)
回答1:

写错了一点代码而已

void print (struct student *head)

{

 struct student *p;

 printf("\nThere are %d records \n\n",n);

 p=head;

 if(NULL!=head)

 {

  do

  {

   printf("学号为 %d 的成绩: %f\n",p->num,p->score);//这里少了双引号 

    p=p->next;

  }while(NULL!=p);

 }

}