c++ code std::map iterator map

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
map<DWORD,MACADDR> arpmap=CAddressHelper::GetARPCache();
 
    map<DWORD,MACADDR>::iterator it;
 
        for (it = arpmap.begin(); it != arpmap.end(); ++it) {
            MACADDR &sMac = (*it).second;
            const DWORD &nIP=(*it).first;
  
            }
 
 
 
c++ 11
for (auto x: arpmap) {
  cout << x.first << endl;
}