Well yes, but it won't do what you expect it to do. As mentioned earlier, an array of char's is actually a pointer. The c_string() function in std::string returns a const pointer to an array of chars, so if you do something like this:
Code:
if(myStdString.c_str() == "--help")
...you will NOT be comparing the contents of the std::string with the constant of the C-style string, you will be comparing the MEMORY ADDRESS of the two. The pointer returned by the c_str() function might point to a random address like 0x00241 and the "==" operator will then check if the "-help" string also resides in 0x00241, which it ofcourse does not.
What you WANT to do is this:
Code:
#include <cstring>
...
if(std::strcmp(myStdString.c_str(), "--help") )
This will compare the CONTENTS of the strings, not the memory address, and i think this is what you really want.