问题如下↓
stu的结构看看,如果字符串是char数组声明的那么直接可以stu[i]=stu【i+1】的。
猜的,major 是字符串数组,这句应修改为:strcpy(stu[j].major, stu[j+1].major);