I have seen sample code similar to the following:
std::string s = \"Hello World!\"; std::map h; for (std::string::const_iterator i=
Indeed that's how map works: The []-operator is mutating and will create the object of mapped type if it does not exist yet. Since size_t value-initializes to zero, you're all fine.
map
[]
size_t