C
Charlie
I use a file to define all of my global variables, data.c, and then I
create a header file, data.h, where I reference all the variables with
the keyword "extern." I include the header in every file.
I define an enum and variable of that type in data.c,
enum myenum
{
val1,
val2,
val3
} enum_var;
When I try to reference the variable, enum_var, in data.h the compiler
does not like it.
I have tried multiple ways of referencing it but I fail each time so
there is clearly something I do not understand about enum or extern or
god knows what.
So I guess to sum up my question is how do I reference the variable
enum_var so that I can include it in each file.
All help would be appreciated.
Thank You,
Charlie
create a header file, data.h, where I reference all the variables with
the keyword "extern." I include the header in every file.
I define an enum and variable of that type in data.c,
enum myenum
{
val1,
val2,
val3
} enum_var;
When I try to reference the variable, enum_var, in data.h the compiler
does not like it.
I have tried multiple ways of referencing it but I fail each time so
there is clearly something I do not understand about enum or extern or
god knows what.
So I guess to sum up my question is how do I reference the variable
enum_var so that I can include it in each file.
All help would be appreciated.
Thank You,
Charlie