struct node *delete(struct node*q)//删除函数
{
printf("请输入要删除的学生姓名");
char k[10];
scanf("%s", &k);
struct node *temp = NULL;
while (q!=NULL)
{
if (strcmp(q->next->data.name, k) == 0)
{
temp = q->next;
q->next = temp->next;
printf("已删除\n");
free(temp);
return q;
}
else
{
q = q->next;
}
}
}
大哥你好,请问可以注释一下咩,新手表示有点难看懂,怕自己理解的意思导致思路不对,从而导致越学越歪