Hi guys,
I'm banging my head against the wall with this one.
I want to sort a <string> vector which contains the following:
"Pen 0.99"
"Pen 0.99"
"Paper 1.50"
"Pad 1.99"
"Paper 1.50"
Into a vector which would sort it as follows:
"Pen 1.98"
"Paper 3.00"
"Pad 1.99"
I know how to add up all the strings/converting to a number etc but I'm having trouble eliminating the 'duplicates' and tieing in the digit to the relative word.