CArray - passing as parameter!
Posted on 2000-03-07
Hi I am using VC++ 6.
I have two CArray declared as
CArray <CellNode, CellNode> GridCells;
CArray <CBug, CBug> BugArray;
CellNode is a struct in class CMyClass and CBug is another class.
I am having a problem with a method in CBug which I pass GridCells declared above. The method is declared as:
void MoveBug(CArray <CellNode, CellNode>&);
The problem is that CellNode struct is part of and declared in CMyClass
and the method in CBug above seems to need it because of the template CArray passed. I cannot declare another CellNode as that will not work and I cannot take CellNode declaration out of CMyClass (that is where it belongs).
How can this be solved?
ps. CBug is included in CMyClass as #include "Bug.h" and including CMyClass in CBug does not seem to work
Bear with me I am pretty new to this.