c++ sort string array descending code example Example: how to sort in descending order in c++ sort(str.begin(), str.end(), greater<int>()); cout<<str;