Hello,
I have two classes. I am trying to get the 2nd class to have a member pointer that points to an instance of the first class (Giving the 2nd class the ability to edit an instance of the first class) . But I am unsure how to set this up (when I use it the values I try to edit don't change)
Here is what I have tried:
class A
{
m_MemberA;
};
class B
{
void SetMemberPointer(*A _a) {m_MemberB = _a;}
A* m_MemberB
};
void main()
{
A Class1;
B Class2;
Class2.SetMemberPointer(&Class1);
}
Can some one explain why this doesn't work/help with a solution?
Thanks