This gives the hint of a useful application: convert input strings to integers so they can be fed to a switch. A couple of new things here:
This program shows an alternate way of initializing the map, using a curly-brace list similar to an array. A map is a list of pairs, so the initializer is a list of sublists.
Another new feature used here is the auto type declaration of the iterator i. The type of i here is the same as in the previous example, map<string,int>::iterator, but auto is easier to type. The auto type can be used whenever a variable is given an initial value, and it means that the variable has the same type as that value. It works just fine when the initial value is a int, but is much more useful when it's something complicated.