+ 1

how to sort datas integer by descending using sort function in algorithm header...

3rd Jul 2016, 3:34 PM
ramabena
ramabena - avatar
3 Réponses
+ 1
vector vet; ... sort(vet.rbegin, vet.rend);
4th Jul 2016, 12:28 AM
Paulo Henrique
+ 1
oh thanks, but i mean in arrays, but thanks for the vector
4th Jul 2016, 12:33 AM
ramabena
ramabena - avatar
+ 1
#include <functional> // greater ... int arr[TAM]; ... sort(arr, arr + TAM, greater<int>());
4th Jul 2016, 12:42 AM
Paulo Henrique