I want to declare a root node and have done the following.
typedef struct node
{
bool is_word;
struct node *children[MAX];
}node;
node *root = malloc(27 * sizeof(struct node));
When I try to compile, I get the following error:
dictionary.c:20:14: error: initializer element is not a compile-time constant
node *root = malloc(27 * sizeof(struct node));
What am I doing wrong?
Thanks in advance for your help.