9.3 Error Codes (<errno.h>)

The <errno.h> header file defines several macros used for error reporting.

Macros

EDOM ERANGE


Error codes that can be stored in errno . They expand to integral constant expressions with unique nonzero values.

Variable or Macro

errno


An external variable or a macro that expands to a modifiable lvalue with type int , depending on the operating system.

The errno variable is used for holding implementation-defined error codes from library routines. All error codes are positive integers. The value of errno is 0 at program startup, but is never set to 0 by any library function. Therefore, errno should be set to 0 before calling a library function and then inspected afterward.


Previous Page | Next Page | Table of Contents | Index