1
Graphics / Re: Font::loadFromFile(), Text::setFont() - problem with pointers; how use them?
« on: August 19, 2013, 03:38:08 am »I still don't see, why you would work with pointers at all... Just use stack allocated object and save you a lot of writing and possible issues.This was just my first SFML 2.1 hello world example code. I often use my ResourceManager class with instance variable like this:
std::map<std::string, sf::Sprite*>
or this:std::map<std::string, std::shared_ptr<sf::Sprite>>
Also don't using namespace std, it will make you and anyone else reading your code more trouble than what it will save you from typing.It's just example code. I'm trying to avoid using "using namespace *" in every project.![]()
You should also add SFML's header to the linking path, so you can use <SFML/Name.hpp>.I did. I just forgot to change double quotation marks into angle brackets.![]()
Done. Thank you for your answerTopic can be closed.Topics get never closed here, but if you want you can add something in front of your first post, to signal that it was solved.![]()
