Hello,
I have 3 c files and 2 header files:
main.c, lifecycle.c, table.c, lifecycle.h and table.h
I worked on the table in a different problem with a different main and it works fine.
The issue I am having is that in both lifecycle.h and table.h I haveSo I get errors like: "error: redefinition of enumerator 'false'" or "note: previous definition is here"Code:typedef enum BOOL { false, true } Boolean;
The way I have linked this is lifecycle.c include:
table.c includes only it's corresponding header file table.h.Code:#include "lifecycle.h" #include "table.h"
main.c includes only lifecycle.h
I get that I should only have this typdef in 1 place because this duplication is causing error, but I'm not sure the best place to put this.
I am not used to using this many files.
So to clarify I want this typedef to work with table.c and lifecycle.c and main.c (all my c files).
I tried moving this typedef but the 2 header files have Boolean returns so the headers must also have access to this typedef.
Thanks,