STL iterator



  • Also ich hab mir mal gedacht über ein std::set ohne for each zu iterieren.
    Nun habe ich folgendes gemacht:

    for(std::set<LPWSTR>::iterator i = PrivateTags.begin(); i < PrivateTags.end(); i++)
    {
        if(Tags.find(*i) != Tags.end())
        {
            delete *i;
            PrivateTags.erase(i);
        }
    }
    

    Das könnte jetzt ein kleiner "anfängerfehler" sein, aber ich hab dann halt mal ein paar fehler bekommen(47 stück):
    .\MView.cpp(265) : error C2784: 'bool operator <(_Interface *,_com_ptr_t<_InterfacePtr> &)' : could not deduce template argument for '_Interface *' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\comip.h(985) : see declaration of 'operator <'
    .\MView.cpp(265) : error C2784: 'bool operator <(int,_com_ptr_t<_IIID> &)' : could not deduce template argument for '_com_ptr_t<_IIID> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\comip.h(976) : see declaration of 'operator <'
    .\MView.cpp(265) : error C2784: 'bool operator <(int,_com_ptr_t<_IIID> &)' : could not deduce template argument for '_com_ptr_t<_IIID> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\comip.h(976) : see declaration of 'operator <'
    .\MView.cpp(265) : error C2784: 'bool operator <(int,_com_ptr_t<_IIID> &)' : could not deduce template argument for '_com_ptr_t<_IIID> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\comip.h(976) : see declaration of 'operator <'
    .\MView.cpp(265) : error C2784: 'bool operator <(int,_com_ptr_t<_IIID> &)' : could not deduce template argument for '_com_ptr_t<_IIID> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\comip.h(976) : see declaration of 'operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stack(90) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stack(90) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stack(90) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\stack(90) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::queue<_Ty,_Container> &,const std::queue<_Ty,_Container> &)' : could not deduce template argument for 'const std::queue<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\queue(103) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::queue<_Ty,_Container> &,const std::queue<_Ty,_Container> &)' : could not deduce template argument for 'const std::queue<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\queue(103) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::queue<_Ty,_Container> &,const std::queue<_Ty,_Container> &)' : could not deduce template argument for 'const std::queue<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\queue(103) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::queue<_Ty,_Container> &,const std::queue<_Ty,_Container> &)' : could not deduce template argument for 'const std::queue<_Ty,_Container> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\queue(103) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\deque(1327) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\deque(1327) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\deque(1327) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\deque(1327) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xtree(1372) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xtree(1372) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xtree(1372) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xtree(1372) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\list(1281) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\list(1281) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\list(1281) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce template argument for 'const std::list<_Ty,_Ax> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\list(1281) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(151) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(151) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(151) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(151) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const _Elem *' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(141) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(131) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(131) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(131) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::basic_string<_Elem,_Traits,_Alloc> &,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce template argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\string(131) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\vector(1276) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\vector(1276) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\vector(1276) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::vector<_Ty,_Alloc> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\vector(1276) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xutility(1880) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xutility(1880) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xutility(1880) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\xutility(1880) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\utility(76) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\utility(76) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\utility(76) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'std::_Tree<_Traits>::iterator'
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include\utility(76) : see declaration of 'std::operator <'
    .\MView.cpp(265) : error C2676: binary '<' : 'std::_Tree<_Traits>::iterator' does not define this operator or a conversion to a type acceptable to the predefined operator
    with
    [
    _Traits=std::_Tset_traits<LPWSTR ,std::less<LPWSTR >,std::allocator<LPWSTR >,false>
    ]

    Weiß jemand wo der Fehler steckt?



  • Zwei Fehler:

    1. Die Abbruchbedingung deiner Schleife musst du mit != statt mit < machen.
    2. Durch erase wird dein Iterator ungültig.

Anmelden zum Antworten