请教一个关于DLL中C++类相互包含的问题?
我有两个类,一个表示元素,一个表示集合。
/********************** UIElementCollection.h **********************/class IUIElement;class DIRECT_UI UIElementCollection{public: UIElementCollection(); ~UIElementCollection();public: int Add(IUIElement *pUIElement); void Insert(int index, IUIElement *pUIElement); void Remove(IUIElement *pUIElement); void RemoveAt(int index); void RemoveRange(int index, int count); int IndexOf(IUIElement *pUIElement); IUIElement* operator[](int index); int Count(); void Clear(); void SetParent(IUIElement *pParent); IUIElement* GetParent();};/********************** UIElement.h **********************/#include "UIElementCollection.h"class DIRECT_UI IUIElement : public IObject{public: IUIElement(); virtual ~IUIElement();public: UIElementCollection Children;};编译错误:iuielement.h(23): error C2146: 语法错误: 缺少“;”(在标识符“Children”的前面)iuielement.h(23): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intiuielement.h(23): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int