M
Morpheus
Hello,
Say I have a class with a member...
char mId;
Whenever an object is created, I want to assign an incrementing
character to this member, for instance the first would be A, then B, C,
D, E etc....
Unless I create a singleton class as a provider for this, the only way
I can think of tracking the last ID would be to use a global variable.
Is there a way to do this without either of the above?
Background: We are in the middle of renovating the entire structure of
our software. A customer needs the current build for other fixes
however at the moment I can not access the methods of a particular
class. A global would give me a temporary workaround to access the
member directly... This is probably not enough info to help out but...
(The actualy member is not a char, but for the purpose of this
question it will suffice.
Say I have a class with a member...
char mId;
Whenever an object is created, I want to assign an incrementing
character to this member, for instance the first would be A, then B, C,
D, E etc....
Unless I create a singleton class as a provider for this, the only way
I can think of tracking the last ID would be to use a global variable.
Is there a way to do this without either of the above?
Background: We are in the middle of renovating the entire structure of
our software. A customer needs the current build for other fixes
however at the moment I can not access the methods of a particular
class. A global would give me a temporary workaround to access the
member directly... This is probably not enough info to help out but...
(The actualy member is not a char, but for the purpose of this
question it will suffice.