Hello,

I have an array, declared as such:

a[0] through a[7] contain numbers that I would like to sort. Were this simply the issue, I'm sure I could find a function on Google. But what's important here is that I don't care about the final sorted array: I need a list of indecies from the original array in the order of the final array. For instance, say:Code:double a[8];

Then I don't want my result to be "2,5,7", I want it to be 2,0,1: the original indicies.Code:a[0]=5; a[1]=7; a[2]=2;

Does this make sense? How would I write this? I'm sure there must be a simple way that I'm missing.

Thanks a lot for your help,