迭代器的类型不要搞错了

 

error C2440: 'initializing' : cannot convert from 'std::_Tree<_Traits>::iterator' to 'std::_Vector_const_iterator<_Ty,_Alloc>'
1>        with
1>        [
1>            _Traits=std::_Tset_traits<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>,false>
1>        ]
1>        and
1>        [
1>            _Ty=unsigned int,
1>            _Alloc=std::allocator<unsigned int>
1>        ]
1>        No constructor could take the source type, or constructor overload resolution was ambiguous

额。。竟然把set写成vector了。。。无言。。。

vector<unsigned int>::iterator iterFollowing = followingSet.begin();

应该是set<unsigned int>::iterator iterFollowing = followingSet.begin();

 

posted on 2017-03-13 19:29  cleverlzc  阅读(139)  评论(0编辑  收藏  举报