we3royalee
Programmer
I am trying to sort the strings in a CListBox by a value in the middle of the string, so the supplied sort will not work. Here is an example of a string from the list box:
"1 bill/bob/bert 25.005 2". The values are tab separated. I need to sort in ascending order by the 25.005 value(let me call it time), so I have been parsing it out of the string and using atoi, then comparing the times of two of the strings, and moving the larger value to the end of the list. This means I have to sort several times to totally sort it. Any ideas on how to sort this list box would be greatly appreciated.
"1 bill/bob/bert 25.005 2". The values are tab separated. I need to sort in ascending order by the 25.005 value(let me call it time), so I have been parsing it out of the string and using atoi, then comparing the times of two of the strings, and moving the larger value to the end of the list. This means I have to sort several times to totally sort it. Any ideas on how to sort this list box would be greatly appreciated.