방금 Visual Studio 2003에서 2005로 프로젝트를 변환했습니다. 대부분 변환되었지만 다음 줄에서 일련의 STL 오류가 발생했습니다.STL 마이그레이션 문제 (VS 2003 -> 2005)
이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
내가 그 코드를 잘못 아무것도 볼 수 없습니다 그것은 VS 2003 어떤 아이디어에서 완벽하게 작동 다음과 같이
void SomeFn(std::vector<CSomeObject*>::iterator it,
std::vector<CSomeObject*>::iterator itBegin = NULL,
std::vector<CSomeObject*>::iterator itEnd = NULL);
비주얼 스튜디오 오류가 무엇입니까?
이상한, 기본값으로 NULL에 대해 불평하는 것으로 보인다. – kenny
정확히 내가 생각하는 바를 - NULL을 주석으로 처리하면 프로그램이 더 이상 작동하지 않는다. – Konrad