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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Using forward del.
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
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
ASKER
Thank you very much
both!
both!