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 AsSortbyNum(STU stu[], int n, int m)
{
int i, j, k, t;
for (i=0; i<n-1; i++)
k = i;
for (j=i+1; j<n; j++)
if (stu[j].num < stu[k].num) k = j;
}
if (k != i)
for (t=0; t<m; t++)
SwapFloat(&stu[k].score[t], &stu[i].score[t]);
SwapFloat(&stu[k].sum, &stu[i].sum);
SwapFloat(&stu[k].aver, &stu[i].aver);
SwapLong(&stu[k].num, &stu[i].num);
SwapChar(stu[k].name, stu[i].name);