say i have a method as this
int someclass::somemethod(const std::string &name) const
{
std::string a = mymap["a"];
.....
}
where mymap
std::map<std::string,std::string>
This is the error i get
Error 1 error C2678: binary '[' : no operator found which takes a left-hand operand of type 'const std::map<std::string, std::string> ' (or there is no acceptable conversion)
Any suggestions on how i can access value of a key ? ?