1) Get used to reading references for the language or library you're using: like this for example
. There is no c_str() but there IS a str() function, which is what you're looking for. That reference even has example code
2) In your TTF_RenderText_Solid call,
use creditString, not another call to the str() function, otherwise why bother with the variable at all?
More obvious EDIT: use creditString.c_str(). My previous suggestion was made while unfamiliar with the TTF function's argument list.
EDIT: RulerOfNothing, did your example code mean to use the c_str() call on the string object, not the stream? as in:
SDL_Surface* output = TTF_RenderText_Solid(font, creditString.c_str(), color);
That may be where the confusion is coming from, as Assassin here is just copy-pasting from your example.