c++cocos2d-iphonecocos2d-xcocos2d-x-3.0cocos2d-android

How to use Map<K, V> with string and int in Cocos2dx-v3 C++?


http://www.cocos2d-x.org/wiki/Map%3CKV%3E

This link only explains with

Map<std::string, Sprite*> 

types.

If I want to use something like this:

 Map<std::string, int>

should I just stick to std::map?

Will I have to do some extra memory management if I use std::map?


Solution

  • should I just stick to std::map?

    Yes.

    Will I have to do some extra memory management if I use std::map?

    No.