I have these two structures...
typedef struct{
MY_SECOND_STRUCT s1;
}MY_FIRST_STRUCT;
typedef struct{
int s1;
}MY_SECOND_STRUCT;
I prefer this order, I dont want to switch them. But compiler dont know MY_SECOND_STRUCT at the moment and I get error
error: expected specifier-qualifier-list before 'MY_SECOND_STRUCT'
I´ve tried add declaration to the top
struct MY_SECOND_STRUCT;
also change definition to
typedef struct{
struct MY_SECOND_STRUCT s1;
}MY_FIRST_STRUCT;
but it didnt help.