jweinst1
9/7/2016 - 5:52 AM

practice using unordered map

practice using unordered map

#include <iostream>
#include <string>
#include <unordered_map>
//small example in C++ using unordered_map
typedef std::unordered_map<std::string, int> dict;

int main() {
	dict x;
	std::string a = "妈";
	x[a] = 3;
	x["日"] = 5;
    std::cout << x[a] << std::endl;
    //3
}