我有一个问题,怎么这个if语句不执行,跳过了?删掉后能输出数据
char数组字符串不能直接==比较,要用strcmp
if (student[i].num == num1) 应修改为:if (strcmp(student[i].num,num1) == 0)
你百度一下C语言的字符串比较