Redeclaring data members in extended types

BlitzMax Forums/BlitzMax Programming/Redeclaring data members in extended types

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Because in the constructor of the base class I make sure the object gets registered with my entitymanager. Of course, I could call the function to add it to the registry in the constructor of the base class but I don't want to have to make the call to that function manually in every derived class.

Your example doesn't do the same.

In the BlitzMax example the constructor New() is first being run. After that you update the data member 'x'.

In the C++ example you pass the value for data member 'x' to the constructor of the base class. So the value of 'x' is known by the constructor of the base class.