sort std::list case sensitive elements

Posted by Dave18 on Stack Overflow See other posts from Stack Overflow or by Dave18
Published on 2010-02-27T08:43:44Z Indexed on 2010/06/09 21:02 UTC
Read the original article Hit count: 159

Filed under:
|
#include <list>
#include <string>
using std::string;
using std::list;

int main()
{
    list <string> list_;
    list_.push_back("C");
    list_.push_back("a");
    list_.push_back("b");

    list_.sort();
}

does sort() function sort the elements according to their character codes? I want the result here to be a b C after the sorting is done.

© Stack Overflow or respective owner

Related posts about c++

Related posts about stl