I have set up the following structs:
typedef struct lineList
{
int lineNum;
struct lineList* Next;
}*Line;
typedef struct DictionaryList
{
char* word;
Line lines;
struct dictionaryList* Next;
}*Dictionary;
and then I have defined:
Dictionary head = NULL; /*is a pointer to head of dictionary list */
Dictionary node = (Dictionary)malloc(sizeof(struct DictionaryList));
...
node->Next = head;
and I get the folowings error: assignment from incompatible pointer type
I don't understand why both head and node are the same type: Dictionary.