New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Use an sf::Texture and use its loadFromFile function.
Then, to draw, use an sf::Sprite and use its setTexture function, then simply draw the sprite.
If you're using a tileset you'll also want to specify the tile area in the loadFromFile function.
Also, make sure sf::Texture does not get moved or destructed. Else you'll end up with white textures.
So don't use a vector to store them.
A map would be better.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Texture.php
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Sprite.php