当前位置:网站首页>Map of STL knowledge summary

Map of STL knowledge summary

2022-06-22 06:51:00 Cephas

1.map It means mapping

Definition :map<typename1, typename2> m;

Pre mapping types are called keys key, Post type becomes value value

2. Element access

By subscript or iterator

Add :

The difference in accessing with iterators is , It can be used it->first Access key , use it->second Access value .

map It will automatically sort by the size of the key from small to large .

原网站

版权声明
本文为[Cephas ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202220544078361.html