Hashtable implementation in C++