In SFML there are a few types of objects (sf::Shape, sf::Sprite, sf::Text) which inherit an abstract base class sf::Drawable. If I create an std::vector can I store all the objects which inherit the sf::Drawable class in that vector?
If you create a std::vector that stores some form of pointer (ideall a smart pointer) you can do it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With