16
General / Re: Sprites inside a Class
« on: April 11, 2016, 05:07:55 pm »
mapPlayers() is not a constructor. Sorry, but you seem to not know what you are doing. I recommand you to read a complete C++ tutorial before trying to play with SFML (and not only some parts). SFML need basics knowledge about C++ programming that it appears you don't have. The problem here is not really SFML related, but instead syntaxic C++ programming.
For your problem, there is multiples solutions. Basicly, you can keep an instance of your texture by adding it as private member of your class. Use something like a ressource manager or even other methods.
If you are convienced you have enough skills, I recommand you to seek for SFML book, and check for the online tutorial the official website provides.
For your problem, there is multiples solutions. Basicly, you can keep an instance of your texture by adding it as private member of your class. Use something like a ressource manager or even other methods.
If you are convienced you have enough skills, I recommand you to seek for SFML book, and check for the online tutorial the official website provides.