1
Graphics / Converting INT to STRING.
« on: May 19, 2012, 02:13:54 pm »
Hello,
Ran into some problems converting int to string before, it compiles and runs fine but doesn't actually display.
Heres the code:
sf::String Text_score; // create a string of text to display
std::stringstream Score;
Score << "Score " << ScoreNumber;
Text_score.SetText(Score.str());
Text_score.SetFont(Cheeseburger);
Text_score.SetSize(35);
Text_score.SetColor(sf::Color::White);
Text_score.SetPosition(150.f, 200.f);
App.Draw(Text_score);
Can anyone shed any light on it?
Cheers
Ran into some problems converting int to string before, it compiles and runs fine but doesn't actually display.
Heres the code:
sf::String Text_score; // create a string of text to display
std::stringstream Score;
Score << "Score " << ScoreNumber;
Text_score.SetText(Score.str());
Text_score.SetFont(Cheeseburger);
Text_score.SetSize(35);
Text_score.SetColor(sf::Color::White);
Text_score.SetPosition(150.f, 200.f);
App.Draw(Text_score);
Can anyone shed any light on it?
Cheers