利用C语言编写的成绩管理系统(链表、结构体)
哪位大佬可以解释一下StuScoreNode *p = score、p = p->next 的意思呀, 好急void SearchStuID()
{
StuScoreNode *p = score;
char id[MAX_ID];
printf(" \t\t\t\t\t ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓ \n" );
printf(" \t\t\t\t\t ┃┃ 请输入要查找学生的学号:┃┃\n\t\t\t\t\t->");
scanf("%s", id);
while(p) //检查学生是否存在
{
if(strcmp(p->data.id, id) ==0)
break;
p = p->next;
}
if(!p)
{
printf(" \t\t\t\t\t ┃┃ 此学生不存在! ┃┃\n");
printf(" \t\t\t\t\t ┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛ \n");
}
else
{
printf(" \t\t\t\t\t ┏━━━━━━━━━━━━━━━━━━━━━━━━━━┓ \n" );
printf(" \t\t\t\t\t ┃┃ 学生信息 ┃┃\n");
printf(" \t\t\t\t\t ┃━━━━━━━━━━━━━━━━━━━━━━━━━━┃ \n");
printf("\t\t\t\t\t -学 号:%s\n", p->data.id);
printf("\t\t\t\t\t -姓 名:%s\n", p->data.name);
printf("\t\t\t\t\t -性 别:%s\n", p->data.sex);
printf("\t\t\t\t\t -C语言成绩:%d\n", p->data.CLanguage);
printf("\t\t\t\t\t -高数成绩:%d\n", p->data.Mathematics);
printf("\t\t\t\t\t -英语成绩:%d\n", p->data.English);
printf("\t\t\t\t\t -线代成绩:%d\n", p->data.Linear);
printf("\t\t\t\t\t -总 分:%d\n", p->data.Total);
printf("\t\t\t\t\t -平 均 分:%.2f\n", p->data.Average);
printf("\t\t\t\t\t -等 级:%c\n", p->data.Level);
printf("\t\t\t\t\t -获得操行分:%.2f\n", p->data.Conduct);
printf(" \t\t\t\t\t ┗━━━━━━━━━━━━━━━━━━━━━━━━━━┛ \n");
}
}