I have a string to convert, string = \"apple\" and want to put that into a C string of this style, char *c, that holds {a, p, p, l, e, \'\\0\
string = \"apple\"
char *c
{a, p, p, l, e, \'\\0\
.c_str() returns a const char*. If you need a mutable version, you will need to produce a copy yourself.
.c_str()
const char*