CS 2213 Advanced Programming, Spring 2001 Programming Assignment 3 Comments
This assignment was graded on a basis of 30 points.
- When you initialize the has thable, you only need to set the status
field of each entry, the the sval field.
- When inserting into the hash table, both the string pointer and the
value is copied from the passed stringval, e.g.
htp[pos].sval.str = sval.str;
htp[pos].sval.val = sval.val;
This can also be done with:
htp[pos].sval = sval;
- hashinit must use a malloc in some form. If you use a static array
it does not allow for multiple hash tables.
- Strings must be compared using strcmp or something similar.
Do not just compare pointers.