算法笔记--STL中的各种遍历及查找(待增)

算法笔记

map:

map<string,int> m;

map<string,int>::iterator it;//auto it

it = m.begin();

while(it != m.end())
{
//it->first;
//it->second;
it ++;
}

set:

multiset<int>ss;
multiset<int>::iterator it=ss.begin();//auto it,multiset元素可以相同
while(it != ss.end())
{
  //*it
  it ++; 
}
上一篇:Game Engine Architecture 5


下一篇:Setup Post-mission Camera