std::make_error_condition(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_condition make_error_condition( std::io_errc e );
|
(desde C++11) | |
Constructs an std::error_condition object from a value of type std::io_errc as if by return std::error_condition(static_cast<int>(e), std::iostream_category()).
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. |
Valor de retorno
Un valor de std::error_condition 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_condition 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.
Ejemplo
Ejecuta este código
#include <iostream>
#include <system_error>
int main()
{
std::error_condition ec = std::make_error_condition(std::io_errc::stream);
std::cout << "error condition for io_errc::stream has value " << ec.value()
<< "\nand message \"" << ec.message() << "\"\n";
}
Salida:
error condition for io_errc::stream has value 1
and message "unspecified iostream_category error"
Ver también
(C++11) |
crea un objeto de condición de error error_category especificado Original: creates an error condition object of specified 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 portátil. (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) |