std::strerror
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <cstring>
|
||
char* strerror( int errnum ); |
||
versión Devuelve el texto del código de error
errnum
. errnum
suele adquirirse a partir de la variable errno
, sin embargo, la función acepta cualquier valor de tipo int. El mensaje es específico del entorno local .Original:
Returns text version of the error code
errnum
. errnum
is usually acquired from the errno
variable, however the function accepts any value of type int. The message is locale-specific.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
La cadena de bytes devuelto no debe ser modificado por el programa, pero pueden ser sobrescritos por una llamada posterior a la función
strerror
. Original:
The returned byte string must not be modified by the program, but may be overwritten by a subsequent call to the
strerror
function. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Contenido |
[editar] Parámetros
errnum | - | valor integral se refiere a un error código
Original: integral value referring to a error code 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
Puntero a una cadena terminada en cero byte correspondiente al código de error
errnum
.Original:
Pointer to a null-terminated byte string corresponding to the error code
errnum
.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ejemplo
Ejecuta este código
Salida:
log(-1) failed: Numerical argument out of domain
[editar] Ver también
Macros para las condiciones de error estándar compatibles con POSIX. (constante de macro) | |
Documentación de C para strerror
|