typedef struct state1_s {
u8 size;
u8 state;
} state1_t;
typedef struct state2_s {
u8 size;
u8 state[2];
} state2_t;
typedef struct state3_s {
u8 code;
u8 count;
}state3_t;
I have these three structures. When i do the following
state1_t comp[8];
state2_t *avail;
state3_t *health;
&comp = (state1_t *)(&(avail->state[2])+1);
i get a expression must be modifiable lvalue error.
I get the same error when i do
&comp = (state1_t *)(&(heaalth->count) +1);
how do i fix this? I want the address of comp to be at the end of one structure. How do i do that?