STL Map
Hi everyone,
i have a real quick and easy question:
Does this get me the first or second item in a map?
PriorityMapIter pos = m_PrioMap.begin();
pos++;
i am trying to get the first item of the map
thx a lot in advance
That doesn't get you any element as such. However, it leaves pos as an iterator that points to the second element. Begin() points to the first element.
Well, it's second in normal-person counting, but first in programmer-counting (it's common to hear experienced programmers talk about the "zeroth element" of an array for example) :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement