unordered_map键值默认是0吗
时间: 2023-10-15 22:29:56 浏览: 93
根据引用,unordered_map是一个存储键值对的容器,并且可以通过键快速索引到对应的值。unordered_map并没有进行特定的顺序排序。根据引用,unordered_map与map的区别并不大,主要是底层使用的数据结构不同,导致效率和顺序性有所差异。因此,unordered_map的键值默认不是0,而是根据具体情况而定。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [C++容器篇,unordered_map和unordered_set容器](https://blog.csdn.net/CHAKMING1/article/details/128740800)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [unordered_map 自定义键值类型](https://blog.csdn.net/IS_MOKE/article/details/126205995)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文