Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ hashmaps

#include <iostream>
#include <unordered_map>
using namespace std;
 
int main()
{
    unordered_map<string, int> sample;
    sample["first"] = 10;
    sample["second"] = 20;
    sample["third"] = 30;
 
    for (auto val : sample)
      cout << val.first << " " << val.second << endl;
 
}
 
PREVIOUS NEXT
Tagged: #hashmaps
ADD COMMENT
Topic
Name
1+3 =