#include #include "hash.h" namespace Hash { unsigned int hash( const std::string& key ) { // Add up all chars. Obviously a really bad hash function, but // you get the idea. unsigned int ret = 0; for( std::string::const_iterator it = key.begin(); it != key.end(); ++it ) { ret += static_cast( *it ); } return ret; } }