I am trying to get information from Tree field I made, and I am getting the error in the title: dereferencing pointer to incomplete type 'struct List_t'
Tree Source File:
struct Node_t{
Element data;
char* location;
struct Node_t* son;
struct Node_t* next;
};
struct List_t{
Node head;
copyFunc copyfunc;
compareFunc compfunc;
freeFunc freefunc;
printFunc printfunc;
};
Tree Header File:
typedef struct Node_t* Node;
typedef struct List_t* Tree;
typedef void* Element;
App Source file:
Tree t;
t = createTree(compareInt, copyInt , freeInt, printInt);
int* x =(int*)malloc(sizeof(int));
*x=53;
Add(t, x);
char* location;
location= t->head->location; //here I got the error
printf(location);
what should I do? what am I doing wrong?
thanks!