std::string to char*
It won’t automatically convert (thank god). You’ll have to use the method c_str() to get the C string version. Note that it returns a const char *; you aren’t allowed to change the C-style string returned by c_str(). If you want to process it you’ll have to copy it first: Or in modern C++: