1
Graphics / Weird Error
« on: November 12, 2008, 12:25:54 am »
This is the piece of Code troubling me:
ClockString is a class inherited from sf::Drawable. time_string is a Member of the type sf::String. The Problem is I get this error when compiling:
I'm not into the debts of c++. Can someone explain to me what is wrong here?
Code: [Select]
void ClockString::Render(const RenderWindow &Window) const
{
time_string.SetText("Some Stuff");
Window.Draw(time_string);
}
ClockString is a class inherited from sf::Drawable. time_string is a Member of the type sf::String. The Problem is I get this error when compiling:
Quote
error: passing `const sf::String' as `this' argument of `void sf::String::SetText(const std::string&)' discards qualifiers
I'm not into the debts of c++. Can someone explain to me what is wrong here?