a.h
list* FunctionNamesCreate();
list* const FunctionNames = FunctionNamesCreate();
a.c
list* FunctionCreate() {
list* FunctionNames = listCreate(sizeof(char*));
listPushHead(FunctionNames,"s");
return FunctionNames;
}
list
is simple void*
linked list structure
When I want to create FunctionNames
global variable the code editor give me the following error: a.h:8:29: error: initializer element is not a compile-time constant
. If I do not use the const
before
FunctionNames
the the code editor give me the same error.