#ifndef HASHED_OBJECT_H #define HASHED_OBJECT_H #include struct My_string { char * chars; size_t size; My_string(char *, size_t); ~My_string(); bool operator==(const My_string& other); }; struct Hashed_string { Hashed_string * next = NULL; Hashed_string * previous = NULL; bool last_element = true; bool initializer = false; // signal the object to act as the "link" between the its reference and the linked list of hashed elemenets. This instance DOES NOT represent a hashed value. My_string string; unsigned int appearances = 1; Hashed_string(); Hashed_string(My_string * s); Hashed_string(Hashed_string * hs); ~Hashed_string(); int append(Hashed_string * new_string); // returns 1 if the word was new and 0 otherwise. void remove(Hashed_string * removed_string); }; #endif