我刚刚将一个项目从Visual Studio 2003转换为2005,尽管它大部分'转换'正常,但我有一系列STL错误来自以下行:STL迁移问题(VS 2003 - > 2005)
void SomeFn(std::vector<CSomeObject*>::iterator it,
std::vector<CSomeObject*>::iterator itBegin = NULL,
std::vector<CSomeObject*>::iterator itEnd = NULL);
Visual Studio的错误如下:
c:\<path>\Headerfile.h(20) : error C2440: 'default argument' : cannot convert from 'int' to 'std::_Vector_iterator<_Ty,_Alloc>'
with
[
_Ty=CObject *,
_Alloc=std::allocator<CObject *>
]
No constructor could take the source type, or constructor overload resolution was ambiguous
我看不出什么错码,它在2003年VS任何想法完美地工作?
很奇怪,我想,似乎是在抱怨NULL作为默认值。 – kenny 2008-11-12 11:21:23