C
Charlie
I have a file, data.c, where I define all of my global variables.
I then have a header file, data.h, which I include in every file in
which I reference all of the variables defined in data.c.
For the most part, I am having no problem with this. However, I
defined an variable of type myenum in data.c:
enum myenum
{
Mon,
Tues,
Wed
} enum_var;
Now when I try to reference enum_var in data.h, the compiler gives me
issues. I have tried multiple ways of referencing it and defining it,
but nothing is working. I guess I just don't understand something
about enum types and/or extern.
Any help would be great.
Thanks,
Charlie
I then have a header file, data.h, which I include in every file in
which I reference all of the variables defined in data.c.
For the most part, I am having no problem with this. However, I
defined an variable of type myenum in data.c:
enum myenum
{
Mon,
Tues,
Wed
} enum_var;
Now when I try to reference enum_var in data.h, the compiler gives me
issues. I have tried multiple ways of referencing it and defining it,
but nothing is working. I guess I just don't understand something
about enum types and/or extern.
Any help would be great.
Thanks,
Charlie