Converting String to Cstring in C++ January 4, 2024 by Tarik .c_str() returns a const char*. If you need a mutable version, you will need to produce a copy yourself.