error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal
-
std::map <iCString,unsigned int> mCounters; //This function populate the "mCounters" map GetCounters(mCounters); map< iCString,unsigned int>::iterator it; for (map<iCString,unsigned int>::iterator it = mCounters.begin(); it = mCounters.end(); ++it) { } I am getting the error mentioned in the subject... what is the mistake I am doing :-( ? Fulll Error message ------------------ error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal 1> with 1> [ 1> _Mytree=std::_Tree_val,std::allocator>,false>> 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
-
std::map <iCString,unsigned int> mCounters; //This function populate the "mCounters" map GetCounters(mCounters); map< iCString,unsigned int>::iterator it; for (map<iCString,unsigned int>::iterator it = mCounters.begin(); it = mCounters.end(); ++it) { } I am getting the error mentioned in the subject... what is the mistake I am doing :-( ? Fulll Error message ------------------ error C2451: conditional expression of type 'std::_Tree_iterator<_Mytree>' is illegal 1> with 1> [ 1> _Mytree=std::_Tree_val,std::allocator>,false>> 1> ] 1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
You missed a symbol from the middle of your for loop expression.
it = mCounters.end()
should be
it != mCounters.end()
-
You missed a symbol from the middle of your for loop expression.
it = mCounters.end()
should be
it != mCounters.end()