严重不安全:STL map 使用map[key]==0判断key是否存在于map中

咱们先来看个实验: #include <iostream> #include <unordered_map> #include <map> #include <vector> using namespace std; int main() { map<int, int> map; unordered_map<int, int> hash; cout << "map[2]=" <
相关文章
相关标签/搜索