Accessing child function from base class - page 3

Samuel Manoel De Souza
need see how you did it. and where you are creating, using and deleting these objects.
Dominik Christian Egert
Instead of public, you would not call first base class update, and then derived update,you do it the other way around.

You call the base class update function from the derived update function.

This way, you get an implicit update call on the base class by calling your derived update function.

When maintaining data shared upon all your objects, you would want your base class to have singleton behaviour.

Singleton is a special way of treating an object, do some research on it on Google. You need to understand the concept of it before implementing.

One aspect goes along with this, as it will get messy else.

You need to define your "has an" object relationship to your deriving "is an" objects. And make sure these stay consistent.

A singleton object usually has both, "is an" and "has an" relationship with itself.