hashmap.h

This file exports the HashMap class, which stores a set of key-value pairs.
Class
HashMap<KeyTypeValueType> This class implements an efficient association between keys and values.
Function
hashCode(key) Returns a hash code for the specified key, which is always a nonnegative integer.

Function detail


int hashCode(const string& key);
int hashCode(int key);
int hashCode(char key);
int hashCode(long key);
int hashCode(double key);
int hashCode(void* key);
Returns a hash code for the specified key, which is always a nonnegative integer. This function is overloaded to support all of the primitive types, the C++ string type, and pointers.

Usage:

int hash = hashCode(key);