Next Previous Contents

## 3.119 perror

> Function

>   Print an error message for the error in `errno`.

> Header

>   `stdio.h`

> Declaration

>   `void __fastcall__ perror (const char* s);`

> Description

>   `perror` prints an error message to `stderr`. If `s` is not `NULL` and not an empty string, it is printed followed by a colon and a blank. Then the error message for the current contents of `errno` is printed followed by a newline. The message output is the same as returned by `strerror` with an argument of `errno`.

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
> Availability

>   ISO 9899

> See also

>   _poserror, strerror

> Example

>   None.

Next Previous Contents