Horje
unordered map c++ Code Example
unordered map c++
// C++ program to demonstrate functionality of unordered_map
#include <iostream>
#include <unordered_map>
using namespace std;
 
int main()
{
    // Declaring umap to be of <string, int> type
    // key will be of string type and mapped value will
    // be of int type
    unordered_map<string, int> umap;
 
    // inserting values by using [] operator
    umap["GeeksforGeeks"] = 10;
    umap["Practice"] = 20;
    umap["Contribute"] = 30;
 
    // Traversing an unordered map
    for (auto x : umap)
      cout << x.first << " " << x.second << endl;
 
}




Cpp

Related
if not c++ Code Example if not c++ Code Example
c++ map loop through key value Code Example c++ map loop through key value Code Example
how to make loop in c++ Code Example how to make loop in c++ Code Example
convert ascii char value to hexadecimal c++ Code Example convert ascii char value to hexadecimal c++ Code Example
FACTORIAL IN C++ Code Example FACTORIAL IN C++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
14