Use c_str() to force the string to be nul-terminated.