Re: Managing multiple instances



Ben,

So when creating instances of class A I cannot provide a
simple enumeration of the instance number when adding to the data
structure or the instance numbers will not be unique.

I'm not sure I understood this... What I got is:

....someone creates an instance of C...
...this C creates one instance of B...
...this B creates an instance of A and assigns it the number 1...
...this C creates one instance of B...
...this B creates an instance of A and assigns it the number 1...

And the problem is that the B's don't remember, from one creation of A
to the next, what number the previous A was assigned. Right ?

How about if it was the responsibility of C to remember that number and
increment it ?

Laurent
.