As soon as you access the map with the [] operator, if the key doesn’t exist it gets added. The int gets “value initialization” invoked – so it will get a value of 0.
As soon as you access the map with the [] operator, if the key doesn’t exist it gets added. The int gets “value initialization” invoked – so it will get a value of 0.