You can use .find()
:
map<string,string>::iterator i = m.find("f");if (i == m.end()) { /* Not found */ }else { /* Found, i->first is f, i->second is ++-- */ }
You can use .find()
:
map<string,string>::iterator i = m.find("f");if (i == m.end()) { /* Not found */ }else { /* Found, i->first is f, i->second is ++-- */ }