I have to write my own hash function. If I wanted to just make the simple hash function that maps each letter in the string to a numerical value (i.e. a=1, b=2, c=3, ...), i
Another way for small strings:
int hash(const char* str) { int hash = 0; int c = 0; while (c < std::strlen(str)) { hash += (int)str[c] << (int)str[c+1]; c++; } return hash; }