VS2008升级到VS2013报错
一个别人提供的项目源码,使用VS2008编译,没有任何问题,但是升级到VS2013后,一个库文件的编译报错,请教原因?
代码如下:
此代码定义在一个头文件中。
/* * * * * * * * * * * list base class * * * * * * * * * * * * */
template<itemType_t MY_ITYPE, class LISTOFCLASS>
class CitemListBase : public vector< LISTOFCLASS* >, public hCobject
{
itemType_t myType;
public:
typedef vector< LISTOFCLASS* >::iterator itemList_it; // 就是这行代码报错了
public:
CitemListBase(DevInfcHandle_t h) : hCobject(h) { myType = MY_ITYPE;};
virtual ~CitemListBase(){ /*destroy();*/ };
//virtual
//RETURNCODE populate(CddbBaseDevice* pDev, UINT32 theDDkey, aCdevice* pAbstractDevice=NULL);
virtual RETURNCODE populate(hCdeviceSrvc* pDev, DevInfcHandle_t hndl,
DD_Key_t theDDkey, aCdevice* pAbstractDevice);
virtual RETURNCODE removeItem(LISTOFCLASS* pTarget);
virtual void fillTypedefs(void);// empty except for LISTs and ARRAYs
virtual void dumpSelf(int indent=0);
virtual void destroy(void); // clear contents before deletion
virtual void calcValidityDependency(void);
virtual void calcAttributeDependency(void);// readded 3jul06
virtual void fillIcontain(void); // stevev 27sep06
virtual void fill_depend_tree(ibWhichDependency_t depType);
virtual void clean_Depends(void);
virtual RETURNCODE inform_Dependents(ibWhichDependency_t depType);
virtual LISTOFCLASS* getBySymbolName(string& symbolName);// stevev 26jul06 (mainly 4 debugging)
};
错误信息如下:
错误 4 error C2146: 语法错误: 缺少“;”(在标识符“itemList_it”的前面)
错误 5 error C2838: “iterator”: 成员声明中的非法限定名
错误 6 error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
这几个错误都指向同一行代码,而且重复包好多遍错误!!!