다음은 컴파일되지 않으며 그 이유는 알 수 없습니다.리스트/이터레이터를 사용하여 어리석은 컴파일 오류 (C++)
#include <list>
using namespace std;
list<char> myList;
list<int>::iterator it;
it = myList.begin();
오류 반복자의 종류가 다른
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'std::list<_Ty>::_Iterator<_Secure_validation>' (or there is no acceptable conversion)
참고. 그래서 다음 줄에는 '[Ty_ = int]와 [Ty_ = char]'와 같은 것이 포함될 것입니다. – MP24