I'm trying to forward declare struct_A and use it within struct_B not as a pointer but as a structure.
Within struct_B, I make reference to struct_B.
I can't seem to get it right - help? Here's my code:
struct type_A_t;
typedef struct type_A_t type_A_t;
typedef struct type_B_t {
type_A_t a;
};
struct type_A_t{
void (*cb)(type_B_t *b1);
void (*cb)(type_B_t *b2);
};
The error I get is:
error: field 'type_A_t' has incomplete type
type_B_tis not defined