Link to home
Start Free TrialLog in
Avatar of rzvika3
rzvika3

asked on

Dependencies between classes

Hi!
I have a class A and class B.
Class A has an array of class B.
Class B has data member of type A.
What should i include (#include) in each of the classes?
ASKER CERTIFIED SOLUTION
Avatar of JMu
JMu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wyn
Wyn

Using forward del.
Avatar of rzvika3

ASKER

Wyn, What do you mean by forward?
o.sorry:)
Just mean

class a;

now you can use  a in b;
 


and declare a and implement it later .

As JMu told.

//it's so-called forward declaration,
:)

Sorry again:)

Best Regards
Wyn
Avatar of rzvika3

ASKER

Thank you very much
both!