3 ms·
Reminds me I found something, perhaps it's yet another gcc thing but. You can define an opaque pointer in a header file thing_pubic.h typedef struct foo_s
by Gibbon1 4y ago
Reminds me I found something, perhaps it's yet another gcc thing but.
You can define an opaque pointer in a header file thing_pubic.h
typedef struct foo_s foo_t; // foo_t is opaque.
And the actual def in a header file thing_private.h
typedef struct foo_s
{
int foo;
} foo_t; // def of foo_t
If you include the first header file you get foo_t as an opaque type. If you include the second or _both_ headers you get the full type.