# include # include # include "icecream.C" # include "string.C" # include "rstream.h" # include "rstream.c" unsigned int hf(const iceCreamRecord & x) { string name(x.name()); return name[2] - 'a'; } # include "openHashTable.h" # include "openHashTable.c" int main() { openHashTable hashtab("/tmp/openHashTableFile", hf); hashtab.create(10); hashtab.add(iceCreamRecord("alex", "vanilla")); hashtab.add(iceCreamRecord("amanda", "strawberry")); hashtab.add(iceCreamRecord("albert", "strawberry")); hashtab.add(iceCreamRecord("alice", "strawberry")); hashtab.add(iceCreamRecord("amy", "chocolate")); hashtab.add(iceCreamRecord("anne", "strawberry")); hashtab.add(iceCreamRecord("alfred", "chocolate")); hashtab.add(iceCreamRecord("andy", "strawberry")); //hashtab.add(iceCreamRecord("arthur", "strawberry")); //hashtab.add(iceCreamRecord("abraham", "strawberry")); return 0; }