Possible Duplicate:
C++ struct sorting
Is it possible to sort a vector in C++ according to a specified sorting method, l开发者_运维问答ike used in Java's Collections.sort that takes a Comparator?
Yes. See the answers to this question from this morning: C++ struct sorting
Yes, it is. Take a look here for an example.
精彩评论