struct student * head,*p1,*p2; n=0; p1=p2=(struct student *)malloc(LEN); printf("输入学生的学号为0时,停止录入.\n"); printf("请输入学生学号:"); scanf("%ld",&p1->num); if(p1->num!=0)
LEN是哪里定义的呢?他的值是怎么来的。
就这几行,没法确认你有啥问题啊