I am in the process of converting a std::vector based list to a CList. Problem is that I have a class that needs to define a member that is a list of its own type (recursive). Here's the pseudo code:
CList<CMyClass, CMyClass&> m_cMyList;
For the record, I can do this with std::vector, but I get error C2079: 'data' uses undefined class 'CMyClass' when I use CList.
Now, I know that I could do this:
CList<CMyClass*, CMyClass*&> m_cMyList;
but I would have a TON of memory management code to write, as this is a very large project that this concept is heavily embedded in.
Am I totally out of luck here, or is there some magical workaround that will get past the compiler errors? Using Visual C++ 6.0 SP3.
The reason I'm doing this is because of the problems we've been having with std::vector. CList has been much more reliable for us, and we want all of our code to use that.
Any and all help is much appreciated!!! Thanks in advance!