You can use std::sort with a STL container, like a vector or a list.
sort() uses random access iterators, so it will not work on a list. STL lists use bidirectional iterators, but they also support their own sort method.
Reputation Points: 1446
Solved Threads: 135
Practically a Master Poster
Offline 681 posts
since Jun 2009