๐ Unordered map
#include <unordered_map>
// unordered_map<key, value>
unordered_map<string, vector<string>> user_info;
user_info["minsu"].push_back("donghee PASSWORD");
user_info["minsu"].push_back("donghee SCORE");
user_info["minsu"].push_back(to_string(88));
user_info["younghee"].push_back("younghee PASSWORD");
user_info["younghee"].push_back("younghee SCORE");
user_info["younghee"].push_back(to_string(97));
if (user_info.empty()) {
cout << "This is Start. Unordered_map is Emptpy" << endl;
}
cout << "Unordered_map's size is : " << user_info.size() << endl;
if (user_info.count("younghee")) {
cout << user_info["younghee"][0] << " " << user_info["younghee"][1] << endl;
}
if (user_info.find("younghee") != user_info.end()) {
cout << user_info["younghee"][0] << " " << user_info["younghee"][1] << endl;
}