Ok, I've got some problems which i can't solve...
Code:
typedef struct abc* abcPtr;
typedef struct def
{
defPtr next;
char *fgh;
}
typedef struct abc
{
defPtr head;
}abcType;
typedef struct overall
{
abcPtr array[20];
} overallType
i get errors from the code below, or segmentation faults to be specific...
say i've created an instance of overall as 'ov' and i pass the address of it to a function as &ov
Code:
for(i=0; i<20; i++)
{
ov->array[i]->head = NULL;
ov->array[i] = NULL;
}
and this error also (chaining off the array)
newNode->next = ov->array[aNumber]->head;
ov->array[aNumber]->head = newNode;