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