Hi,
just experimenting with OOP here (OOP newbie alert ;D !!) and am wondering if anyone can supply me with a quick example of a 'class within a class' ?
I am able to set up a pointer to a class variable easy enough and then invoke methods of the class; no problem.
What I am unable to do, however, is set up a second class having a pointer as one of its public members, set up instances of the two classes, set the pointer in the second class variable to point at the first class variable and then invoke methods of the first class through this pointer. The only way I can get this to work is to use a temporary pointer etc. which I can't help but feel should be redundant!
I can post my errant code if this would help anyone get to the root of my problem!
Thanks in advance.
Stephen.
Yep!
I think it is wiser to post a piece of code.
Regards!
Quote from: pistol350 on July 31, 2007, 07:49:27 AM
Yep!
I think it is wiser to post a piece of code.
Regards!
Sorry, I have it all working now but do have to use a temporary pointer variable - even with the c-style pointers.