Answers for "iterate through an unordered map c++"

C++
0

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
*/
Posted by: Guest on May-01-2020

Code answers related to "iterate through an unordered map c++"

Browse Popular Code Answers by Language