#include <iostream>
#include <unordered_map>
#include <string>
using std::string;
using std::cout;
using std::endl;
int main()
{
std::unordered_map<string, int> workers({{ "Liam ", 45}, { "Logan", 37}, { "Ethan", 51}});
std::unordered_map<string, int>::iterator it;
it = workers.find("Logan");
if (it != workers.end())
{
cout << "Found - " << it->first << " Age: " << it->second << endl;
}
else
{
cout << "Not Found" << endl;
}
return 0;
}
/*
run:
Found - Logan Age: 37
*/