1234567891011
#include <iostream> #include <functional> int main() { std::string name ; std::cout << "name? " ; std::getline( std::cin, name ) ; std::hash<std::string> hash ; std::cout << "name: " << name << " hash code: " << hash(name) << '\n' ; }