C++ Programming
04-11-2010, 10:00 PM
i need help with writing a c code
lets say i have an array[5]
i need to make a new array that gets the indexes of the array[5] from the maximum number to the minimum one.
example
{2,5,1,8,4}
my new array of indexes will be (counting from ZERO)
{3,1,4,0,2}
i though of sorting it and save the indexes in a temporary array or something but it didnt work
any ideas how can i solve this ?
lets say i have an array[5]
i need to make a new array that gets the indexes of the array[5] from the maximum number to the minimum one.
example
{2,5,1,8,4}
my new array of indexes will be (counting from ZERO)
{3,1,4,0,2}
i though of sorting it and save the indexes in a temporary array or something but it didnt work
any ideas how can i solve this ?