What is the difference in getting a value through
aMap.at(key) in C++?
map::at exists (who knew?).
It throws an exception if the key doesn't exist,
aMap.end() if the element doesn't exist, and
operator value-initializes a new value for the corresponding key if no value exists there.
If you access a key using the indexing operator
 that is not currently a part of a map, then it automatically adds a key for you. This is a huge caveat, and take this into consideration. For this reason, I prefer using the indexing operator
 for setting, and
.at() for lookup.
Another advantage of using
 is the fact that it can operate on a
const std::map, whereas