You can do this:
(*myFruit)["apple"] = 1;
or
myFruit->operator[]("apple") = 1;
or
map<string, int> &tFruit = *myFruit;
tFruit["apple"] = 1;
or (C++ 11)
myFruit->at("apple") = 1;
You can do this:
(*myFruit)["apple"] = 1;
or
myFruit->operator[]("apple") = 1;
or
map<string, int> &tFruit = *myFruit;
tFruit["apple"] = 1;
or (C++ 11)
myFruit->at("apple") = 1;