I've been trying to create a sf::Font and sf::Text but when I do it keeps giving an error that "fent/toxt does not name a type".
Help would be greatly appreciated:
struct VelText
{
sf::Font fent;
fent.loadFromFile("cour.ttf");
sf::Text toxt;
toxt.setFont(fent);
toxt.setColor(sf::Color::Red);
toxt.setPosition(0,500);
void updateText(int nVelFact)
{
stringstream ss;
ss << nVelFact;
std::string strVelFact = ss.str();
toxt.setString(strVelFact);
}
};
FIXED:
Made the fent.loadFromFile etc. part of a create() function which solved the problem