How much it is safe to store and reuse the iterator values of map in another map?

  • Thread starter Thread starter sgrm123
  • Start date Start date
S

sgrm123

Guest
Hi,

How much it is safe to store and reuse the iterator values of map in another map?

map<BYTE,vector<connections*>*> mconnections1;//sorting connections based on device key.
for (map<Device*,vector<connections*>>::iterator it=m_eip.m_mvpConnections.begin(); it!=m_eip.m_mvpConnections.end(); ++it)
mConnections1[it->first->DEVICE_KEY]=&it->second;
for (map<BYTE,vector<connections*>*>::iterator it=mConnections1.begin(); it!=mConnections1.end(); ++it){
for(unsigned int i=0;i<it->second->size();i++) it->second->at(i)->Write(&fp);
}


Thanks

Continue reading...
 
Back
Top