I am working on a project, where i have problem with understanding the logic. I would appreciate i someone could explain it to me or make it at least more clear. Data structure is hash table if it changes something.
Code:
typedef struct tHTElem {
char* key;
int data;
struct tHTElem* ptrnext;
} tHTElem;
typedef tHTElem* tHT[MAX_SIZE];
As long as i understand this, tHT[] is array of pointers to structure tHTElem ?
So if i want to create pointer to one element of this array, i should create it like this ?
tHTElem *ptrToElem = NULL;
And initialize it like this ?
ptrToElem = tHT[42];
I am kinda lost in this..
Thank you for any advice.
ptrToElem. Also,tHTElem *ptrToElem = NULL, already initializedptrToElemtoNULL.MAX_SIZE?tHTis a type name, so you cannot index it.