I want to write an comparator/sort function which can give me the values in ascending order. The values are in hex.
Lets say map is of type:
map<string, vector<class_A objects> >
There is one hex property associated with each object of the vector. Lets call that property as 'z'. By hex property, I mean that there is a property which is of type 'hex', in the form of 11'h000 or may be 11'hfff. I want to sort that vector based on the hex property.
What I have currently in my vector is and their 'z' properties are 11'h000, 11'h00b, 11'h007 respectively. I need to sort that vector based upon 'z' property so that it becomes .
I would be happy to write more details in case needed.