#include #include #include #include #include #include int main(int argc, char **argv) { FILE *f; char *buf; HASH *h = new HASH(); if ((f = fopen("data", "r")) == NULL) DIE("unable to open file"); while(buf = READFILE(f)) { ARRAY *ar = SPLIT(buf); h->AddElement(ar[0], ar[1]); free(ar); free(buf); } printf("price of apple is : %s\n", h->GetElement("apple")); fclose(f); return(0); }