how to get hash code of a string in c++

In C++03, boost::hash. In C++11, std::hash.

std::hash<std::string>()("foo");

Leave a Comment