Alright, I'm trying to call a function from a class in C++ what overides a function from its parent class.
The class is setup:
BaseClass
that has the update function declared publicly like this:
virtual void update() = 0;
Then I have the Object
class what extends the BaseClass
. In this class I declare update again by doing:
virtual void update() override;
Then I have my Player
class what has its update function declared like this:
void update() override;
I then store a vector of object and loop through it the vector is declared:
std::vector<Object> _objs
Do I have to create a new vector to loop through to call the right update function or is there some sort of way I can call the right update function when im looping through a array of object?