排序
for (i = 2; i <= num*(num - 1); i++){
if (distance[i - 1].distance < distance[i].distance)
{
int temp=0;
distance[temp] = distance[i];
for (j = i - 1; distance[temp].distance < distance[j].distance; j--)
{
distance[j] = distance[j + 1];
distance[j + 1] = distance[temp];
distance[temp] = distance[j];
}
}
}
怎么让他从大到小排序