2015-08-17 41 views

回答

1

的答案是使用std::unordered_map::begin(bucket_num)std::unordered_map::cbegin(bucket_num)獲得指向第一個元素到桶迭代器和迭代的剷鬥末端 std::unordered_map::end(bucket_num)

for (auto it = u_map.begin(bucket_num); it!= u_map.end(bucket_num); ++it) 
{ 
    cout<<it->first<<", "<<it->second<<endl; 
} 
相關問題