Was wondering if anyone could help...
I know the std::map automatically sorts it values - I have a map a Date object pointer, and a bool for whether it is to be used or not. But I need the dates to be in order from earliest to latest - since I need to store the object pointer, it's storing them in the wrong order now! :(
The dates are stored in YYYYMMDD format so it should be possible to order them correctly, but how would you go about sorting them? I've tried writing my own function to do it (by iterating through the map and attempting to put them in order to a new map) but the order comes out the same.
Any help would be much appreciated, even jsut a few pointers (excuse the pun :))!