When I try to have a struct as an element in another struct I get the following error
if I use simple data types I don't get the error
When I try to have a struct as an element in another struct I get the following error
if I use simple data types I don't get the error
Hi,
This is because you have not declared a_struct
as a type.
So you either need to modify it so that it is declared with typedef
like this:
typedef struct { uint32_t variable1; uint32_t variable2; } a_struct;
or, use it like this (with struct
):
typedef struct { struct a_struct var1; struct a_struct var2; } b_struct;
My apologies, I made a simple copy paste error. Sorry for the trouble.
My apologies, I made a simple copy paste error. Sorry for the trouble.