HP 3000 Manuals

offsetof [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

offsetof 

Finds the offset of a member in a structure.

Syntax 

     #include <stddef.h>
     offsetof (type, member);

Parameters 

type          The name of a structured data type.

member        The name of an element within the data structure type.

Return Values 

x                     The byte offset of member within the structure type 
                      returned as an unsigned integer of type size_t.

Description 

The offsetof macro calculates the offset in bytes of member from the
beginning of the structure (type).  The value returned is a variable of
type size_t, which is defined in <stddef.h>.

See Also 

ANSI C 4.1.5



MPE/iX 5.0 Documentation