编译显示warning assignment discards qualify,求教修正方法
程序代码:
struct student { long studentID; char sutdentName[10]; int courseScore[N]; int totalScore; float averaScore; }; typedef struct student STUDENT; void sortDescendingByScore(int stuNum,const STUDENT stuInformation[],STUDENT *pStuScoreUp[]) {//传入一个指针数组,利用指针数组来给student结构体排序,地址存入指针数组 int i,j,k; for(i = 0;i < stuNum-1;i++) { k = i; for(j = 1;j < stuNum;j++) { if(stuInformation[i].totalScore < stuInformation[j].totalScore) k = j; } if(k != i) pStuScoreUp[i] = &stuInformation[k]; } printf("If you want to output the information of students,enter /'11/' \n"); }在倒数第三行 pStuScoreUp[i] = &stuInformation[k];,编译的时候,显示warning assignment discards qualify
不知道该怎么解决?我感觉没有用错啊...