The iterator returned by find
is an iterator over keys and values, in the form of a std::pair<KeyT, ValT>
(in your case std::pair<char, std::string>
). So in order to access the value associated with the key you've looked up, you need to use it2->second
(i.e. the second item in the pair). See the example code in the docs.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…