Issue
If I have this:
typedef struct {
foo_t *bar;
} foo_t;
then I get errors like error: unknown type name ‘foo_t’
. I could make bar a void* and cast later, but that seems like the wrong way to go.
Is there a proper way to resolve this chicken and egg problem?
Solution
Something like this
typedef struct foo_t {
struct foo_t *bar;
} foo;
So your type is foo, which is the same as struct foo_t
Answered By - Nathan Day