need see how you did it. and where you are creating, using and deleting these objects.
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.
Issue with template classes.
Questions on OOP in
OOP, next problem: how
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register