This is my first attempt at a hash table data structure. My problem is how can i change the stuct Entry_t for the class Hash_map so that Entry wouldn't be invalidated type. Also, i get this error "error C4430: missing type specifier - int assumed" for my function pointer declaration...
Code:
typedef template< class Map>
class Hash_Map
{
private :
typedef struct Entry_t
{
Map * Object;
Entry_t * next;
string * Key;
int position;
}Entry * Primary[], * Seconadary[];
Entry * make_node(std::string, Map * map );
size_t Num;
size_t secondary_size;
unsigned int (*Hash_function) (const * char, int );
public:
Hash_Map( Entry & P , size_t & N );
Hash_Map( Hash_Map & Map_secondary);
// the default SuperFastHash comes from the included header file
Hash_Map( int & num, unsigned int(*Hash_funct)(const * char, int) = SuperFastHash);
~Hash_Map();
int insert(std::string key, Map & map);
int deletion(std::string key);
bool isFull();
Map * find(std::string key);
int Secondaryinsert(std::string key, Map & map);
Swap_Hash(int leftoff)
};
#endif