Originally Posted by
Elysia
strcmp is oblivious to what a std::string is (it has no overload that takes a std::string), and no implicit conversion from std::string -> const char* exists, therefore it does not work. There is no need to use strcmp with std::string.
I am going to take it you did...
str1.compare(str2) < 0
...and if that is the case, you need to post an example of your code that demonstrates the problem.
Otherwise, you have a bug (though I don't think it should compile).
The same thing as str1.compare(str2) < 0.