jweinst1
6/15/2017 - 2:00 AM

playing with unordered maps in C++

playing with unordered maps in C++

#include <unordered_map>
#include <string>

int main(){
    std::unordered_map<std::string, int> dict;
    dict["foo"] = 3;
    dict["hoo"] = 4;
  for (auto& x: dict) {
    std::cout << x.first << ": " << x.second << std::endl;
  }
    return 0;
}

/*hoo: 4
foo: 3*/