Assuming the following:
float my_array[4];
You can sort it like this:
#include <algorithm>
float* first(&my_array[0]);
float* last(first + 4);
std::sort(first, last);
Note that the second parameter ( last) points to one end of the end of your 4-element array; this is the right way to pass the end of your array to STL algorithms. From there you can call:
std::reverse(first, last);
. sort, , STL ; .