Standard C++ Library Reference ISO/IEC (VERSION3)
Next
<stddef.h>
Include the standard header <stddef.h> to define several types and macros that are of
general use throughout the program. The standard header <stddef.h> is available even in a
freestanding implementation.
/* MACROS */
#define NULL <either 0, 0L, or (void *)0> [0 in C++]
#define offsetof(s-type, mbr) <size_t constant expression>
/* TYPES */
typedef si-type ptrdiff_t;
typedef ui-type size_t;
typedef i-type wchar_t; [keyword in C++]
NULL
#define NULL <either 0, 0L, or (void *)0> [0 in C++]
The macro yields a null pointer constant that is usable as an address constant expression.
offsetof
#define offsetof(s-type, mbr) <size_t constant expression>
The macro yields the offset in bytes, of type size_t, of member mbr from the beginning of
structure type s-type, where for X of type s-type, &X.mbr is an address constant
expression.
ptrdiff_t
typedef si-type ptrdiff_t;
The type is the signed integer type si-type of an object that you declare to store the result of
subtracting two pointers.