You can use std::map::at
member function, it returns a reference to the mapped value of the element identified with key k.
std::map<char,int> mymap = {
{ 'a', 0 },
{ 'b', 0 },
};
mymap.at('a') = 10;
mymap.at('b') = 20;