Convert string to char c. c_str() results in undefined behavior.