实在不好意思,各位高手谁能帮忙注释下
void insert(struct student *stu) {
struct student *p0, *p1, *p2;
p1 = head;
p0 = stu;
if(head == NULL)
{
head = p0;
p0->next = NULL;
}
else
{
while((p0->num > p1->num)&&(p1->next != NULL))
{
p2 = p1;
p1 = p1->next;
}
if(p0->num <= p1->num)
{
if(head == p1)
head = p0;
else
p2->next = p0;
p0->next = p1;
}
else
{
p1->next = p0;
p0->next = NULL;
}
}
TOTAL_NUM++;
}
void display(struct student *p)
{
printf("%ld\t%s\t%d\t%s\t%s\t%s\t%ld\t%s\n", p->num, p->name, p->age, p->sex, p->birthday, p->address, p->tele_num, p->E_mail);
}