For speller.c, you can't pass a pointer to the root node (I'm using a trie) to check()
, size()
, and unload()
.
And I couldn't create a global root node in dictionary.c
error: initializer element is not a compile-time constant
So, how do they know what to check, measure and unload?
getNode()
I created, which returns a pointer to an empty node. So, in dictionary.c, I initializedstruct node* root = getNode();
outside the functions, so it will be accessible to all functions. – ballaneypranav Jun 16 '14 at 15:00struct node* = NULL;
– Kareem♦ Jun 16 '14 at 15:01struct node*
is a data type! How can I initialize a data type to NULL? – ballaneypranav Jun 16 '14 at 15:12struct node* root = NULL
! – Kareem♦ Jun 16 '14 at 18:02