Re:Ideas I would like to build / see built
by cperciva on Sunday April 11, 2010 @05:08AM
(#1256594)
It works because C structs are just contiguous bits of memory, interpreted as various fields
Well... almost. C structs can have internal padding -- but the C standard doesn't allow padding before the first element, so that first element is guaranteed to begin at the beginning of the struct.
Well... almost. C structs can have internal padding -- but the C standard doesn't allow padding before the first element, so that first element is guaranteed to begin at the beginning of the struct.