So the object ot type B, which is in the object of type A (obj) can perform operation on the containing object:
void SetContaingObject(A *a);
void B::SetContaingObject(A *a)
ContaingObject=NULL;//#define NULL 0x0
I have created the example in the editor of replies, so it may contain syntax errors, but I think the may idea is clear.
Wish me luck- Tomorrow I have a test on Complex Analisis.