I would like to sort a 2D array[3][5] of float in descending order based on the last 'cell' e.g. [0][4], [1][4], . . .
This method isn't working. Thanks in advance for any help.Code:. . . scorecard[i][j] = ttl_pts; // load array for(u = 1; u < FLIGHT; ++u) for(v = FLIGHT; u < v; --v) if(scorecard[v-1][4] < scorecard[v][4]) swap(scorecard[v-1], scorecard[v]); // designate row? swap void swap (int * p, int * q) { int temp; temp = *p; *p = *q; *q = temp; }
Keith