R
roadster
Hi,
I'm new to C++ and I don't know how I can implement an association
between two objects.
e.g. we have objects A and B. B has the following interface-function :
GetInfo()
From within a function of A I want to get info of object B : so I need
to call :
B->GetInfo();
This gives a compile error, saying that B is an unkown variable. I can
solve this by making B a global class, but I know that this isn't the
right way to do this.
How do I need to do this? Any examples?
Greetz....
I'm new to C++ and I don't know how I can implement an association
between two objects.
e.g. we have objects A and B. B has the following interface-function :
GetInfo()
From within a function of A I want to get info of object B : so I need
to call :
B->GetInfo();
This gives a compile error, saying that B is an unkown variable. I can
solve this by making B a global class, but I know that this isn't the
right way to do this.
How do I need to do this? Any examples?
Greetz....