You can also initialise members in a constructor:
class player {
public:
int the;
sf::Font font;
sf::RectangleShape shape;
sf::CircleShape circle;
player()
{
the = 5;
shape.setSize(sf::Vector2f(50, 50));
circle.setRadius(50.f);
}
};
or directly in its initialisation list:
class player {
public:
int the;
sf::Font font;
sf::RectangleShape shape;
sf::CircleShape circle;
player()
: the(5)
, font()
, shape(sf::Vector2f(50, 50))
, circle(50)
{
}
};