Outline of definitions for Hash Table address book class person { public: string name, address, phone; // whatever is appropriate goes in here // this class is a given, we are interested // in the hash table parts. }; class hashtable { protected: int N; // amount of data inserted int H; // size of array double min_fullness, max_fullness; class hashlink // a protected class means we don't have // to worry about protecting its members { public: // CORRECTED // I forgot to type "public:" originally // and nothing works without the public: person * data; hashlink * next; hashlink(person * p, hashlink * n = NULL); }; hashlink * * table; void resize(); int hash(string s); public: hashtable(int init_size = 0); void add(person * p); person * find(string name); int get_N(); int get_H(); void set_fullness_range(int fmin, int fmax); }; // Now we are outside the class definition, the methods // must be defined like this... hashtable::hashtable(int init_size) { /* the constructor */ } int hashtable::hash(string s) { /* calculate hash value */ } void hashtable::resize() { /* work out new size H based on N and minimum fullness then it's a lot like resizing a vector. */ } void hashtable::add(person * p) { /* etc etc etc remember to increment N if maximum fullness is exceeded, call resize */ } hashtable::hashlink::hashlink(person * p, hashtable::hashlink * n) { /* the constructor for hashlink */ } // and so on and so on.