unordered_map c++ iterate code example
Example: how to iterate over unordered_map c++
for(auto it : umap){
cout<< it->first << " " << it->second << endl;
}
/*
umap = [
{1 , "Hello"},
{2 , "world"}
]
*/
/*
Output :
1 Hello
2 World
*/
for(auto it : umap){
cout<< it->first << " " << it->second << endl;
}
/*
umap = [
{1 , "Hello"},
{2 , "world"}
]
*/
/*
Output :
1 Hello
2 World
*/