Silly-sounding compilor error
Quote:
linked_list.c:113:6: note: expected ‘struct LinkedListNode *’ but argument is of type ‘struct LinkedListNode *’
?????? That makes no sense! lol!
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
Code:
typedef struct LinkedistNode
{
Entry* data; /*Entry is another struct type */
struct LinkedListNode* next;
} LinkedListNode;
typedef struct
{
LinkedListNode* head;
} LinkedList;
(Yes, I am making a linked list)
Something that might be relevant... Here's the function that it's having trouble with:
Code:
void freeNode( LinkedListNode* node) /*This is line 113 */
{
/*Relevant code here */
}
And here's the line that calls freeNode():
Code:
freeNode( (*list).head);
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)
Thanks for your help!