C
Charles
Hello
I am working with classes and I have a little question: how do you
create a pointer on the object in which the procedure sits?
More precisely, I have an object A, which has a procedure that allows
to create some Objects B. This procedure gets a pointer on object B
each time it creates one. It is therefore easy to have a list of
pointer to B stored in A.
Now I would like to create a link the other way round. I would like to
store in B a pointer to object A. Ideally that would be done when I
create B in the procedure. But for that, I need in the definition of
the procedure (which sits in object A) to use a pointer on A. Is there
a sort of "myself" instruction that I can use for that?
Not sure if this is clear. Thanks in advance
Best regards
Charles
I am working with classes and I have a little question: how do you
create a pointer on the object in which the procedure sits?
More precisely, I have an object A, which has a procedure that allows
to create some Objects B. This procedure gets a pointer on object B
each time it creates one. It is therefore easy to have a list of
pointer to B stored in A.
Now I would like to create a link the other way round. I would like to
store in B a pointer to object A. Ideally that would be done when I
create B in the procedure. But for that, I need in the definition of
the procedure (which sits in object A) to use a pointer on A. Is there
a sort of "myself" instruction that I can use for that?
Not sure if this is clear. Thanks in advance
Best regards
Charles