Next Previous Contents

## 3.149 strerror

> Function

>   Return a string describing an error code.

> Header

>   `string.h`

> Declaration

>   `char* __fastcall__ strerror (int errcode);`

> Description

>   The `strerror` function returns a string describing the given error code. If an invalid error code is passed, the string "Unknown error" is returned, and `errno` is set to `EINVAL`. In all other cases, `errno` is left untouched.

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
>   - While the return type of the function is a `char*`, the returned string must not be modified by the caller!
> Availability

>   ISO 9899

> See also

>   _stroserror

> Example

>   None.

Next Previous Contents