What is the best way to use two keys with a std::map?

后端 未结 9 1946
你的背包
你的背包 2021-01-30 03:54

I have a std::map that I\'m using to store values for x and y coordinates. My data is very sparse, so I don\'t want to use arrays or vectors, which would result in

9条回答
  •  渐次进展
    2021-01-30 04:42

    Hope you will find it useful:

    map> troyka = { {4, {{5,6}} } };
    troyka[4][5] = 7;
    

提交回复
热议问题