Why do you use strcmp for a std::string? strcmp receives char*, not strings! You have to cast if you must use strcmp, but I do not think you are obliged to do something like that.

Note also, that...