okay, that's something else. You're mixing constructing an object and loading the image.
To create your static image, you have to use the constructor of sf::Image like this :
sf::Image Stick::StickImage = sf::Image(); // Or any other Ctor.
Then you have to load it. This process is in fact not related to the above construction. You can load the image in the Ctor of you class, but it wouldn't be smart to load your image many times. So you could have something like this :
class Titi {
static sf::Image tata;
static void LoadTataOnce();
public:
Titi();
};
/*--*/
sf::Image Titi::tata; // Default Ctor
Titi::Titi() {
LoadTataOnce();
}
void Titi::LoadTataOnce() {
static bool is_loaded = false; // initialized once to false for all the program time life.
if (!is_loaded) {
tata.LoadFromFile(...) or tata.Create(...);
is_loaded = true; // Updated this static var to load only once tata.
}
}
As you can see it is not directly related to SFML but to a more general code structure : every time you have such static variables (that need some function call like create or load after the ctor) you can apply the above structure.
But sometimes it's not the best solution and ResourceManager are more useful. That's let you delegate responsibilities to some other classes/functions.
BTW, this may have some interest for you :
http://geosoft.no/development/cppstyle.html/Have fun!