C++ type cast error

I am wondering whatis wrong with the following code

      for ( vector< UINT >::const_iterator l_Iterator = l_Clients.begin();
             l_Iterator!= l_Clients.end(); l_Iterator++ )
      {
            switch ((UINT)l_Iterator )

}

 error C2440: 'type cast' : cannot convert from 'std::_Vector_const_iterator<_Ty,_Alloc>' to 'UINT'
        with
        [
            _Ty=UINT,
            _Alloc=std::allocator<UINT>
        ]
        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
bobbeyAsked:
Who is Participating?
 
pgnatyukCommented:
You wanted the value, probably. So (*l_Iterator)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.