Sorting from highest to lowest

Hello everyone, I'm fairly new to C++ or programming for that matter and I ran into a snag. My program generates 6 random numbers and I need to sort them from highest to lowest. Can anyone tell me a way to do that?
Put them in an array, then like this:
sort(array, array+5, std::greater< int >());

This requires you to include the algorithm and functional headers.

Topic archived. No new replies allowed.