Jan 13, 2015 at 5:55pm
Hi Folks,
Still at my platformer ^^. I'm going very Super-Mario-Bros like, and the stats are not to be left away x).
I didnt Encounter any Problems with printing the actual score, but I'd like to Format it.
I want it to have always six spots not depending on the current score.
So if my score was 0, it should be 000000.
So if my score was 1000, it should be 001000
Any suggestions? I'm working with strings and stringstream...
EDIT: Here is how I'm loading updating the Score
1 2 3 4
|
m_Score++;
std::stringstream ss;
ss << m_Score;
sScore = ss.str().c_str();
|
This is the way my score is loaded. The m_Score++ is just to test whether it updates correctly
Last edited on Jan 13, 2015 at 6:18pm
Jan 13, 2015 at 10:27pm
Wow, sometimes its impressive how much of a *&?/; i am ^^'
Anyway, thats exactly what I've been searching for! :DD
After #include <iomanip>
I got it working :) Thanks Peter