you should use this as
typedef std :: map myMapType;
myMapType myMap;
But be careful when inserting your class into this, as if you inserted more than once for the same key, you will never receive a notification:
Call myMapType :: iterator itr myMap.find (key), depending on the type of return and your programming requirements that you can fulfill.
Like a wise attempt to request access to any element using the [] operator, for example
somefunc(myMap[10]);
Since you will not get an error on the map, even there it was marked inserted for key 10
source share