我遇到了一个问题,我想将项目添加到链表的末尾,但似乎我在这里陷入了无限循环。
void addCheckPoint(struct checkPoints **checkPoint) {
struct checkPoints *checkPt = *checkPoint;
while (checkPt->next != NULL) {
checkPt->next;
if (checkPt->next == NULL) {
scanf("%c %d %d %d %d", &checkPt->dropOut, &checkPt->currentPoint, &checkPt->competitor, &checkPt->hour, &checkPt->minute);
}
}
}