Check out example codes for "iterar un map c++". It will help you in understanding the concepts better.
Code Example 1
//traditional way (long) for(map<string,int>::iterator it=m.begin(); it!=m.end(); ++it) if(it->second)cout<<it->first<<" "; //easy way(short) just works with c++11 or later versions for(auto &x:m) if(x.second)cout<<x.first<<" "; //condition is just an example of use
Learn ReactJs, React Native from akashmittal.com