If the map type is std::map
, or something similar that conforms to the standard Associative Container interface, then it contains key-value pairs, of type std::pair<const K, V>
, and that is what you get when you dereference the iterator.
To access the value, you need the second element of the pair:
V & value = it->second;
If the map type doesn't conform to the standard interface, then you'll need to look at its documentation; I can't guess how it might work.