SFML community forums
Help => Graphics => Topic started by: ico170 on May 06, 2013, 10:26:51 am
-
hy i am trying to print the value of the sf::clock as text,can anybody help me with that because i cant convert it to string...
how to make the float in to a sf::string?
i am using sfml 2.0
-
Converting numbers to strings is a basic language feature, not something specific to SFML.
So: Google "C++ float to string" ;)
-
i get the conversion but the clock doesnt want to print only text of current time but prints all the values beffore even if i put string.clear();
-
Donc reuse the same stringstream. Either create a new one for every conversion, or call stringstream.str("") if you use the same instance.
-
that will work :) ty