我声明了static CTypedPtrList<CObList, CObjOffice *> m_queueOffice;可出错了
AuxPageOffice.obj : error LNK2001: unresolved external symbol "private: static class CTypedPtrList<class CObList,class CObjOffice *> CAuxPageOffice::m_queueOffice" (?m_queueOffice@CAuxPageOffice@@0V?$CTypedPtrList@VCObList@@PAVCObjOffice@@@@A)我把里面的代码注释掉就不出错,为什么?
void CAuxPageOffice::FindObj(CObjOffice* obj)
{
POSITION pos = m_queueOffice.GetHeadPosition();
bool bExist = false;
for(; pos != NULL; m_queueOffice.GetNext(pos))
{
if(*m_queueOffice.GetAt(pos) == *obj)
{
bExist = true;
break;
}
}
if(bExist)
delete obj;
else
{
m_queueOffice.AddTail(obj);
}
}
AuxPageOffice.obj : error LNK2001: unresolved external symbol "private: static class CTypedPtrList<class CObList,class CObjOffice *> CAuxPageOffice::m_queueOffice" (?m_queueOffice@CAuxPageOffice@@0V?$CTypedPtrList@VCObList@@PAVCObjOffice@@@@A)我把里面的代码注释掉就不出错,为什么?
void CAuxPageOffice::FindObj(CObjOffice* obj)
{
POSITION pos = m_queueOffice.GetHeadPosition();
bool bExist = false;
for(; pos != NULL; m_queueOffice.GetNext(pos))
{
if(*m_queueOffice.GetAt(pos) == *obj)
{
bExist = true;
break;
}
}
if(bExist)
delete obj;
else
{
m_queueOffice.AddTail(obj);
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货