I would like to forward declare a typedef struct, to use it in another struct, and then to implement the original struct.
I have tried the following code but does not compile.
struct _s1;
struct _s2;
typedef struct _s1 s1;
typedef struct _s2 s2;
typedef struct _big_struct {
s1 my_s1;
s2 my_s2;
} big_struct;
struct _s1 {
int i1;
};
struct _s2{
int i2;
};
Any idea?