R
Rob Jackson
HiI've got a struct, known by file A.c, which contains a pointer to
struct B. Struct B is unknown by file A.c (it is declared in C.h), and
contains a typedef enum, which is declared in a file B.h, which is
included in file A.c (this is getting really confusing, I know!).I
want to access the enum in file A.c, but don't want to include file
C.h, for various reasons.I've tried casting the enum, but still get
the error "Dereferencing pointer to incomplete type.
"Example://fileA.c<#include> "fileB.h"struct a *a_struct; if
(a->b->typedefed_enum == enum_VALUE)////fileB.htypedef enum
{enum_VALUE, enum_OTHER } enum_type; //If this actually makes sense
(I've reread it, and can just about get my head around it!), has
anyone got any ideas how to cast it? (or do anything else to access
it).I've tried if ((enum_type) a->b->typedefed_enum == enum_VALUE
)but to no avail.Thanks,Rob
struct B. Struct B is unknown by file A.c (it is declared in C.h), and
contains a typedef enum, which is declared in a file B.h, which is
included in file A.c (this is getting really confusing, I know!).I
want to access the enum in file A.c, but don't want to include file
C.h, for various reasons.I've tried casting the enum, but still get
the error "Dereferencing pointer to incomplete type.
"Example://fileA.c<#include> "fileB.h"struct a *a_struct; if
(a->b->typedefed_enum == enum_VALUE)////fileB.htypedef enum
{enum_VALUE, enum_OTHER } enum_type; //If this actually makes sense
(I've reread it, and can just about get my head around it!), has
anyone got any ideas how to cast it? (or do anything else to access
it).I've tried if ((enum_type) a->b->typedefed_enum == enum_VALUE
)but to no avail.Thanks,Rob