data structure

ok, this might be a stupid doult, but heres it anyway



union mix_t {
long l;
struct {
short hi;
short lo;
} s;
char c[4];
} mix;

this was in the toutorial in other data types, according to it, when declaring a varible like this mix.s.hi why do we need to say s, its that a object of struct? or is it just the name of struct. pls help lol
Last edited on
struct {
short hi;
short lo;
} s;

declares a single instance, named s, of an unnamed struct.
Topic archived. No new replies allowed.