std::make_error_code(std::io_errc)
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 <ios>
|
||
std::error_code make_error_code( std::io_errc e ); |
(desde C++11) | |
Construye un objeto std::error_code partir de un valor de tipo std::io_errc como por return std::error_code(static_cast<int>(e), std::iostream_category()). Esta función es llamada por el constructor de std::error_code cuando se les da un argumento std::io_errc .
Original:
Constructs an std::error_code object from a value of type std::io_errc as if by return std::error_code(static_cast<int>(e), std::iostream_category()). This function is called by the constructor of std::error_code when given an std::io_errc argument.
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
e | - | número de código de error
Original: error code number 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
Un valor de std::error_code tipo que tiene el número de código de error de
e
asociado con la categoría de error "iostream" .Original:
A value of type std::error_code that holds the error code number from
e
associated with the error category "iostream".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
#include <iostream> #include <system_error> int main() { std::error_code ec = std::make_error_code(std::io_errc::stream); std::cout << "Error code from io_errc::stream has category " << ec.category().name() << '\n'; }
Salida:
Error code from io_errc::stream has category iostream
[editar] Ver también
(C++11) |
crea un código de error a partir de una error_category Original: creates an error code from an error_category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función) |
(C++11) |
Mantiene un código de error dependiente de la plataforma. (clase) |
(C++11) |
los códigos IO secuencia de error Original: the IO stream error codes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (enum) |