SFML community forums
Help => Graphics => Topic started by: jlebrech on December 06, 2010, 01:10:29 pm
-
I'm trying to do SetText( with an int inside it, so for example saying how much hp there is.
I'm stumped, I tried atoi, and casting and some other code i found that was supposed to do it, but no luck.
Help please :)
for example i'd like the following string written "hp:100/100".
-
Use: http://cplusplus.com/reference/iostream/stringstream/
And to get it as a std::string: http://cplusplus.com/reference/iostream/stringstream/str/
-
http://www.sfml-dev.org/forum/viewtopic.php?t=3385
http://www.sfml-dev.org/forum/viewtopic.php?t=3217
-
thanks, ever so helpful.