hi. this isn't really related to SFML, but to C++. i'm going to help you, but I suggest you to have a look on the topic around in google later.
you need to pass arguments to your function drawHero(). these arguments are references OR copies of other variables. in this case, you want to pass a reference of your original window, because if you pass a copy you'll end up having one game window for each Hero (what would be weird in a game). to pass by reference you use the '&' signal. so, basically it becomes like this:
class Hero
{
Texture wizard;
Sprite s_wizard;
Hero();
public: //notice that the drawHero function needs to be public to be accessed from outside; in this case, it is called from main()
void drawHero(sf::RenderWindow&);
};
and this:
Hero::Hero()
{
wizard.loadFromFile("files/magician.png"); // I want to load the texture inside contstructor
s_wizard(wizard);
}
void Hero::drawHero(sf::RenderWindow& window_ref)
{
window_ref.draw(s_wizard);
}
and in your main code:
main(){
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML"));
Hero hero;
//[your code]
hero.drawHero(window); //here we pass the window to be accessed from inside the Hero
//[more code]
return 0;
}