我都查了2天了,还是不知道问题出在那??
ren20 2001-03-25 06:19:00 class CMaps : public CObject
{
public:
int GetPathNum() //得到数组指针的成员数量
{
if(m_PathArray)
return m_PathArray.GetSize();
else
return 0;
};
virtual void Serialize(CArchive& ar);
DECLARE_SERIAL(CMaps)
CMaps(UINT id,CString name,CString mComment="");
CMaps();
virtual ~CMaps();
CTypedPtrArray <CObArray,CPath*> m_PathArray;
};
如果getpathnum() 作成内联函数,如上,编译就出现:
error C2451: conditional expression of type 'class CTypedPtrArray<class CObArray,class CPath *>' is illegal
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
如果,不设为内联,就可以通过,这是为什么??
我简化了程序, cpath 也是一个类。
请帮助