This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
// 11函数功能:交换法实现字符串按字典顺序排序
void SortbyName(STU stu[], int n, int m)
{
int i, j, t;
for (i = e; i <n - 1; i++)
for (j = i + 1; j <n; j++)
if (strcmp(name[j],name[i]) < 0)
for (t =e; t<m;t++) /*交换m门课程的成绩*/
SwapFloat(&score[i][t],&score[j][t]);
}
SwapFloat(&sum[i],&sum[j]); /*交换总分*/
SwapFloat(&aver[i],&aver[j]); /*交换平均分 */
SwapLong(&num[i],&num[j]); /*交换学号 */
SwapChar(name[i],name[j]); /*交换姓名 */