#include #include #include "Hash.hpp" int main() { Hash hash(32); std::string town; unsigned int population; while (std::cin >> town && std::cin >> population) { if (!hash.insert(std::make_pair(town, population))) { std::cerr << "insertion of " << town << " failed." << std::endl; } } hash.for_each([](auto& object) { std::cout << object.first << " " << object.second << std::endl; }); }