From cplusplus.com reference it seems that std::set sorts elements.
I need to have sorted strings, but I’m not sure if it will work well on every platform and compiler. Mainly GCC, MinGW, VC.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By its definition
std::setis a sorted container. Its part of the standard. Having it sorted helps maintain that its a set rather than just an arbitrary collection.Source: http://www.sgi.com/tech/stl/set.html