- Stddef.h
stddef.h is a
header file in thestandard library of theC programming language which defines themacro NULL and the typesptrdiff_t ,wchar_t , andsize_t .Inclusion
In C, one includes the
header file "stddef.h", as in:In C++, one includes the
header file "cstddef", as in:Namespace
The
header file "stddef.h" places its definitions in the global scope; theheader file "cstddef" placessize_t andptrdiff_t innamespace "std".NULL
A macro that expands to a null pointer constant.It may be defined as ((void*)0), 0 or 0L depending on the compiler and the language.
Type size_t
The type
size_t represents the appropriate type for representing the size of objects of memory areas, and for use in dereferencing the elements of an array. It has an implementation-dependent size; usually, it has a 32-bit representation on 32-bit systems and a 64-bit representation on 64-bit systems. It isunsigned . It has a signed variation,ssize_t , defined in theUNIX header file , "unistd.h".Type wchar_t
An implementation-specific "wide character" type, which is predefined in the
C++ programming language but requires the header "stddef.h" or "wchar.h" in theC programming language .Type ptrdiff_t
The type
ptrdiff_t is a type that can hold the result of subtracting two pointers. The underlying type ofptrdiff_t varies from implementation to implementation.External references
* [http://www.opengroup.org/pubs/online/7908799/xsh/stddef.h.html stddef.h] on
The Open Group
* [http://www.cplusplus.com/reference/clibrary/cstddef/ stddef.h] onCPlusPlus.com
* [http://msdn2.microsoft.com/en-us/library/2b6eh9x3(VS.80).aspx cstddef] onMSDN
Wikimedia Foundation. 2010.