"no suitable constructor exists to convert from" error when i'm using cocos2d::Map container

I made LPFEED class and I declared pFeed by it. And it is the data of the m_FeedMap(cocos2d::Map Container).
And I made Key Value of the m_FeedMap. It is declared pair<int,int>.

And when i use ‘insert’ method of the m_FeedMap, “no suitable constructor exist to convert from” error occured.

Is there anyone who know the way of solving the problem?

It looks like you may want to use the STL map container(s) directly and use std::map<int,int> instead of cocos2d::Map.

cocos2d::Map is a wrapper around std::map (or unordered_map) and it requires the value type to derive from Ref* since it automatically retains/releases when adding/removing items.

Thanks for good answer! I already solved the problem by one int variable.
(int)m_Feed_TileLocation.x + ((int)m_TileLocation.y) * N (N is the value of the Max Tile Length)

Is there any other good way for direct accessing to get a GID value?

Are you hitting up against a performance issue or just curious?

Use getTileGIDAt to get GID for a given Vec2 tile coordinate. This is the suggested method since if you create a sprite out of a tile the access is different than if not.

If you want direct access to the GID tile data then you can access through getTiles() on the given layer.