Firstly, you can convert a c++ string to a char array using myString.c_str()
.
Also, you can use sprintf() with format codes to produce a string. Then you can draw that string using SDL. For example:
char myString[1024];
sprintf(myString, "Hello my name is %s", "foo");
draw_using_SDL(myString);