Question about data container 'map'

Don't you need to set the size of the map?

I saw a code where typing m[k] would create the element whose key was k and at the same time access it, how is this possible?
Map's [] operator will actually create an element with that key if it does not already exist. This is a little weird since other containers don't work that way.
Topic archived. No new replies allowed.