Hey bro!!! Take in mind that to do this you have to create an texture fisrt to use like an (lets suppose
) an mask to an blank face..so..suppose that you want to create an texture to an sprite called "ship" (ship.png for example)..
you create the Texture:
// Ship texture
sf::Texture ship_texture;
ship_texture.loadFromFile("ship.png");
// Define the ship sprite
sf::Sprite ship_sprite;
// Set the texture for the sprite
ship_sprite.setTexture(ship_texture);
// So...after you create the game loop you can put
window.clear();
// Draw the sprite
window.draw(ship_sprite);
window.display();
// And you have your image on screen!
I hope that this helps...good luck on your programming road..and do the best that you can do..