You are using
std::find[
^]. This is a generic algorithm that works for any container, but it has no knowledge of the properties of the elements of the container. The elements of a map are (key,value) pairs, not strings. Therefore, find fails to compare the elements with the string you pass as the search value. It would need an operator to compare a map element type to string, which doesn't exist.