In my C++ code, I access a map through iterator. Update the map if necessary and re-assign it to class variable. In proceeding statements, I want to use updated map value again. Should I load the map again, refresh the iterator? etc. e.g. the map is:
MapType tbl = device->trust();
MapType::iterator iter_trust = tbl.begin();
tbl.insert(std::pair<int, double> (node->getId().id(), 0.1));
to execute the following on updated value, what should I do?
iter_trust = tbl.find(node->getId().id());