Including Necessary Definitions

Many run-time library routines use constants, type definitions, or macros defined in a header file. To use the routine, you must include the header file containing the needed definition(s). The following list gives examples:

Definition Example

Macro If a library routine is implemented as a macro, the macro definition appears in a header file. For instance, the toupper macro is defined in the header file CTYPE.H.
Manifest constant Many library routines refer to constants that are defined in header files. For instance, the _open routine uses constants such as _O_CREAT, which is defined in the header file FCNTL.H.
Type definition Some library routines return a structure or take a structure as an argument. For example, stream input/output routines use a structure of type FILE, which is defined in STDIO.H.