Namensräume
Varianten
Aktionen

perror

Aus cppreference.com
< c‎ | io

 
 
File input/output
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dateizugriff
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Direkte Eingabe / Ausgabe
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fread
fwrite
Unformatierte Eingang / Ausgang
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formatierte Eingabe / Ausgabe
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Datei Positionierung
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ftell
fgetpos
fseek
fsetpos
rewind
Fehlerbehandlung
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clearerr
feof
ferror
perror
Operationen auf Dateien
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove
rename
tmpfile
tmpnam
 
Defined in header <stdio.h>
void perror( const char *s );
Weiter zu stderr den Inhalt des null-terminierte Zeichenkette, auf die s (es sei denn s ist eine Null-Pointer), gefolgt von den beiden Zeichen ": ", durch die Implementierung definiert Fehlermeldung mit der Beschreibung des Fehlercodes derzeit im System-Variable gespeichert, gefolgt errno (identisch mit dem Ausgang des strerror(errno)), gefolgt von '\n' .
Original:
Prints to stderr the contents of the null-terminated character string pointed to by s (unless s is a null pointer), followed by the two characters ": ", followed by the implementation-defined error message describing the error code currently stored in the system variable errno (identical to the output of strerror(errno)), followed by '\n'.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

s -
Zeiger auf einen null-terminierten String mit erläuternden Nachricht
Original:
pointer to a null-terminated string with explanatory message
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

(None)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

#include <fcntl.h>
#include <stdio.h>
 
int main()
{
    if (open("non_existent", O_RDONLY) == -1) {
        perror("open()");
    }
}

Output:

open(): No such file or directory

[Bearbeiten] Siehe auch

gibt einen Text-Version eines bestimmten Fehlercode
Original:
returns a text version of a given error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion) [edit]