So I am trying to make a std::vector<> that will contain my Components:
class Component
{
private:
public:
Component();
void update();
~Component();
};
the vector is inside my Object Class :
class Object
{
private:
std::vector<?> m_Components;
public:
Object();
void addComponent(? component)
{
m_Components.push_back(component);
}
~Object();
};
So I have tried using templates but it failed error : use of a variable template requires template argument list
Do I need to use templates ? if yes how ? thanks for your help!
Edit : My Components are derived from the Component class