map key exists c++ code example
Example 1: map in c++ find whether key exists
if ( m.find("f") == m.end() ) {
// not found
} else {
// found
}
Example 2: c++ map key exists
if ( !(myMap.find("key") == myMap.end()) ) { // "key" exists
} else { // not found
}