GNU Info

Info Node: (libc.info)Structure Measurement

(libc.info)Structure Measurement


Prev: Floating Type Macros Up: Data Type Measurements
Enter node , (file) or (file)node

Structure Field Offset Measurement
----------------------------------

   You can use `offsetof' to measure the location within a structure
type of a particular structure member.

 - Macro: size_t offsetof (TYPE, MEMBER)
     This expands to a integer constant expression that is the offset
     of the structure member named MEMBER in a the structure type TYPE.
     For example, `offsetof (struct s, elem)' is the offset, in bytes,
     of the member `elem' in a `struct s'.

     This macro won't work if MEMBER is a bit field; you get an error
     from the C compiler in that case.


automatically generated by info2www version 1.2.2.9