sdl@lists.libsdl.org
[Top] [All Lists]

Re: [SDL] TTF_RenderText_Solid using const char?

Subject: Re: [SDL] TTF_RenderText_Solid using const char?
From: "hardcoder"
Date: Tue, 09 Feb 2010 16:05:43 -0800
Second argument to ant TTF_Render functions has type const char *. If you want to use std::strings which are of course then you must do this:

std::string str("some text");

surface = TTF_RenderText_Solid(Font, str.c_str(), color);
_______________________________________________
SDL mailing list
SDL@xxxxxxxxxxxxxxxx
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
<Prev in Thread] Current Thread [Next in Thread>