I have defined a linked list as follows:
and I tried using this code to add a new word to the linked list:Code:struct node{ char word[9]; struct node *next; }; typedef struct node NODE;
but I get a complier error saying that in line 65 I do not have compatible types.Code:void push(NODE **headref, char string[9]) { NODE *newnode=malloc(sizeof(NODE)); newnode->word=string; /*LINE 65*/ newnode->next=*headref; *headref=newnode; }
Can anyone help me figure this out?