L
Larry.Martell
I have only been working with C++ for 3 years, and I've come across
some code I don't understand.
static struct ct {
char ns, fl;
short sf;
struct st
{
char sy, fq;
ct* n;
} __attribute__ ((packed)) * sta;
st& os() const
{
return (st&) sf;
}
} __attribute__ ((packed)) *mc;
My confusion is about the os method. It appears to me that it returns
a reference to the st struct. But how does returning sf become a
reference to st?
TIA
-larry
some code I don't understand.
static struct ct {
char ns, fl;
short sf;
struct st
{
char sy, fq;
ct* n;
} __attribute__ ((packed)) * sta;
st& os() const
{
return (st&) sf;
}
} __attribute__ ((packed)) *mc;
My confusion is about the os method. It appears to me that it returns
a reference to the st struct. But how does returning sf become a
reference to st?
TIA
-larry