Hello,
I have a class "Container", which is just a Container for self-written widgets derived from sf::Drawable. It has a vector, which holds them. Also, I have the class "GUIManager", which is a class containing ALL widgets of the GUI (also in a vector). It has a function to add a Container to the GUI, in which all widgets from the vector of the Container are copied to his vector of all widgets.
I made the whole thing with shared_ptr s, because it seemed handy to me. So in the vectors of the Containers and also of the GUIManager are shared_ptr s to the widgets. But that becomes a problem more and more and gets to complicated, so I tried to store the widgets normal, without pointers, and just pass pointers of them to the GUIManager.
But I can't declare normal variables to classes derived from sf::Drawable, because sf::Drawable is a abstract class.
How can I do this (store object from classes derived from sf::Drawable in a normal variable)?