No real differences I see from your description. How you "find" the array and whether it's local or global, doesn't matter.
Originally Posted by flyvholm
Your source was right, you compare the elements of the array, just like you were going to sort them, but instead of sorting the elements, you sort the index elements you made just before starting the comparisons.
Sets the index array up.
for (i = 0; i < arraysize; i++)
index[i] = i;
When you go to print up the "sorted" array, remember to print it out THROUGH the index array.
Why don't you post up your specific code that's causing you problems. I'm not sure at all that I've got my head wrapped around what the real problem is that you're having.