strerror

Maps an errno value to a message string.

Library:LibC
Classification:ANSI
Service:Characters and Strings

Syntax

  #include <string.h> 
   
  char *strerror (
     int   errnum);
  

Parameters

errnum

(IN) Specifies the error number to be mapped to an error message.

Return Values

Returns a pointer to the error message. The array containing the error string should not be modified by the program. This array can be overwritten by a subsequent call to the strerror function.

Remarks

The strerror function maps the error number in errnum to a locale-dependent error message string and returns a pointer to it.

See Also