Pointer equality when used inside structs
I've been trying to get one pointer to equal the other pointer for quite some time but It just won't do it, and i'm not really sure why.
The structs are:
typedef struct{
struct listNode* next;
} listNode;
typedef struct{
listNode* head;
} linkedList;
However in code, when I try to execute: node->next = list->head
I get a 'assignment from incompatible pointer type' error. Any Help would be much appreciated since I can really see anything wrong! Thanks