Initial import.

This commit is contained in:
Arnout Engelen
2004-06-29 13:31:04 +00:00
commit be624683f0
21 changed files with 1804 additions and 0 deletions

30
hashtbl.h Normal file
View File

@@ -0,0 +1,30 @@
#include <stdlib.h>
#include <stdio.h>
class HashNode
{
public:
~HashNode();
char * key;
void * content;
HashNode * next;
};
class HashTable
{
public:
HashTable(int n_size);
~HashTable();
void add(char * key, void * content);
void * get(char * key);
private:
int size;
HashNode ** table;
HashNode * newHashNode(char * key, void * content, HashNode * next);
unsigned int HashString(const char * str);
HashTable(); // We leave this unimplemented ;)
};