R
Ralfeus
Hi all.
I have a base class and several classes inherited from this base
class. I need to create a instances counter for each class. I thought
about something like creation of virtual static member in the base
class and increasing it in each derived class constructor. But it's
not possible to create a virtual data member. Which alternative way
can be? Or only way is to create a static data member in each class?
Thank you
I have a base class and several classes inherited from this base
class. I need to create a instances counter for each class. I thought
about something like creation of virtual static member in the base
class and increasing it in each derived class constructor. But it's
not possible to create a virtual data member. Which alternative way
can be? Or only way is to create a static data member in each class?
Thank you