1
General / Re: sf::Keyboard
« on: September 24, 2016, 10:32:53 am »
Awesome ! Thanks a lot ! But I have problem with cpp
error::<const sf::Keyboard::Key, std::shared_ptr<DirectConsition>> has no member 'choosenDirection' "
but this syntax works mapOfDirects[direction]->choosenDirection(*this);
I don't know how to do it ;/
Could you help me please ? Thanks advance !
EDIT
It works : it->second->choosenDirection(*this)
std::map<sf::Keyboard::Key, std::shared_ptr<DirectConditions>>::iterator
it=mapOfDirects.find(direction);
it->choosenDirection(*this); // any of this syntax work
// (*it)->choosenDirection(*this); //
// *it->choosenDirection(*this); //
it=mapOfDirects.find(direction);
it->choosenDirection(*this); // any of this syntax work
// (*it)->choosenDirection(*this); //
// *it->choosenDirection(*this); //
error::<const sf::Keyboard::Key, std::shared_ptr<DirectConsition>> has no member 'choosenDirection' "
but this syntax works mapOfDirects[direction]->choosenDirection(*this);
I don't know how to do it ;/
Could you help me please ? Thanks advance !
EDIT
It works : it->second->choosenDirection(*this)