Espacios de nombres
Variantes
Acciones

perror

De cppreference.com
< c‎ | io

 
 
File input/output
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Acceso a archivos
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.
Directo de entrada / salida
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
Entrada sin formato / salida
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.
Formato de entrada / salida
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.
Presentar posicionamiento
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
Gestión de errores
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
Las operaciones en los archivos
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 );
Láminas a stderr el contenido de la cadena de caracteres terminada en nulo apuntado por s (a menos que s es un puntero nulo), seguido de los dos caracteres ": ", seguido de la aplicación definida mensaje de error que describe el código de error almacenado actualmente en la variable de sistema errno (idéntica a la salida de strerror(errno)), seguido por '\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.

Contenido

[editar] Parámetros

s -
puntero a una cadena terminada en nulo con mensaje explicativo
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.

[editar] Valor de retorno

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

[editar] Ejemplo

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

Output:

open(): No such file or directory

[editar] Ver también

devuelve una versión de texto de un código de error
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.

(función) [edit]