| Types and objects | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <stdio.h> | ||
void perror(constchar*s); | ||
Prints a textual description of the error code currently stored in the system variableerrno tostderr.
The description is formed by concatenating the following components:
s, followed by": " (unlesss is a null pointer or the character pointed to bys is the null character)errno, followed by'\n'. The error message string is identical to the result ofstrerror(errno).Contents |
| s | - | pointer to a null-terminated string with explanatory message |
(none)
Possible output:
fopen() failed: No such file or directory
(C11)(C11) | returns a text version of a given error code (function)[edit] |
C++ documentation forperror | |