?????? That makes no sense! lol!linked_list.c:113:6: note: expected ‘struct LinkedListNode *’ but argument is of type ‘struct LinkedListNode *’
Does anyone have any idea what I may have done wrong? I'm only just learning about structs, so I might not have that down pat.
Here's my definition of the appropriate structs, that I have put into a .h file
(Yes, I am making a linked list)Code:typedef struct LinkedistNode { Entry* data; /*Entry is another struct type */ struct LinkedListNode* next; } LinkedListNode; typedef struct { LinkedListNode* head; } LinkedList;
Something that might be relevant... Here's the function that it's having trouble with:
And here's the line that calls freeNode():Code:void freeNode( LinkedListNode* node) /*This is line 113 */ { /*Relevant code here */ }
I'm comipiling with gcc (on Ubuntu) with the -Wall -ansi -pedantic flags attached... (My teacher told me to, as we need to be using C89)Code:freeNode( (*list).head);
Thanks for your help!



1Likes
LinkBack URL
About LinkBacks


