Index:
[thread]
[date]
[subject]
[author]
From: Ngai Chiu Wong <ncw2@duke.edu>
To :
Date: Sat, 6 Mar 1999 23:53:17 -0500
circular include problem
This is kind of related to the circular declaration problem we talked
about in the beginning of the semester
I have classes A and B with their declaration in A.h and B.h and their
implementation in A.cc and B.cc. There are also B's subclasses in B.h and
B.cc.
In A.h, I have B as a private variable. In A.cc, I call B's function.
In B.h, I have A as private variable for B and its subclasses. In B.cc, I
call A's function in B's subclasses.
I tried to put the pre-declaration
class A
above B's declaration in B.h and it didn't work.
I tried to put the pre-declaration
class B
above A's declaration in A.h and it didn't work.
The reason for failure in both case is, I have to know what functions
do the pre-declared class provide.
What should I do?
john wong.
Index:
[thread]
[date]
[subject]
[author]