Hi guys, i know i have posted this many times. However, i am still facing problems sorting my string array.
the story is i am supposed to sort my string array in accordance to civiIndex.
which in this case, civiIndex was originally a float value and i converted it to string using stringstream.
then i tried to use sort<[array-name],[array-name]+size,greater<string>());
However, it sorts in descending order in alphabetical order. Not in accordance
to civiIndex.
then i tried to implement a boolean function into my sort
Ok thank you. I figured out the logic to trial and error. Correct me if i`m wrong, if i want to compare the values of 36.11 and 75.35. I would just need to store them at the first value and they would compare as per the sort? +)