So, currently I have this :
std::map<std::string, sf::Sprite*> sprites;
and I loop trough it like this :
for (auto const& i : sprites)
{
window->draw(i.second);
}
But when I try to run it, it tells me that :
illegal indirection
void sf::RenderTarget::draw(const sf::Vertex *,size_t,sf::PrimitiveType,const sf::RenderStates &)': cannot convert argument 1 from 'sf::Sprite *const ' to 'const sf::Drawable &
Reason: cannot convert from 'sf::Sprite *const ' to 'const sf::Drawable'
No constructor could take the source type, or constructor overload resolution was ambiguous
Note :I'm pretty new to both C++ and SFML so it might be obvious.
It might not even be a SFML problem.