struct node { struct node *next; char *data; }; class table { private: struct node **adtHashTable; unsigned int hashsize; public: table() { table(1009); }; table(unsigned int hashsize); ~table() {}; adtHashFunction(const char *cpKey); } table::table(unsigned int hashsize) { adtHashTable = malloc(hashsize * sizeof(node *)); int i; for(i = 0; i < hashsize; i++) { adtHashTable[i] = NULL; } } table::adtHashFunction(const char *cpKey) { unsigned int adtHashPosition = 0; struct node *newnode; // calculate your hash value of cpKey, total % hashsize newnode = new node; if(!adtHashTable[adtHashPosition]) { adtHashTable[adtHashPosition] = newnode; } else { struct node *current = adtHashTable[adtHashPosition]; while(current->next) { current = current->next; } current->next = newnode; } }