std::strerror
From cppreference.com
Template:cpp/string/byte/sidebar
| Defined in header <cstring>
|
||
| char* strerror( int errnum ); |
||
Returns text version of the error code errnum. errnum is usually acquired from the errno variable, however the function accepts any value of type Template:cpp. The message is locale-specific.
The returned byte string must not be modified by the program, but may be overwritten by a subsequent call to the strerror function.
Contents |
Parameters
| errnum | - | integral value referring to a error code |
Return value
Pointer to a null-terminated byte string corresponding to the error code errnum.
Example
Output:
log(-1) failed: Numerical argument out of domain
See also
| macros for standard POSIX-compatible error conditions (macro constant) | |