Hello:
I have a question regarding struct when making hash buckets eg.
typedef struct _hashNode
{
void *key;
void *value;
struct _hashNode *next;
} hashNode;
let's say when I create the table:
hashNode *nodeList = (hashNode *)malloc(sizeof(hashNode) * 200);
This is because I want a fixed list size and then each of these array spots will be a linked list or "buckets" for inserting values downwards. (I hope you understand this) Anyways, if I were to insert values into lets say nodeList[5]->key, would I have to allocate memory to key
eg. nodeList[5]->key = (void *)malloc(sizeof(void) +1);
Or does that automatically do that when I allocate memory to the nodeList[5].
thanks