std::make_error_code(std::io_errc)
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <ios> | ||
std::error_code make_error_code(std::io_errc e ); | (dal C++11) | |
Costruisce un oggetto std::error_code da un valore di tipo std::io_errc come per returnstd::error_code(static_cast<int>(e), std::iostream_category()). Questa funzione viene chiamata dal costruttore di std::error_code quando somministrato un argomento std::io_errc.
Original:
Constructs an std::error_code object from a value of type std::io_errc as if by returnstd::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.
Indice |
[modifica]Parametri
e | - | Errore di numero di codice 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. |
[modifica]Valore di ritorno
Un valore di tipo std::error_code che contiene il numero di codice di errore da
e
associata alla categoria di errore "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.
[modifica]Esempio
#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';}
Output:
Error code from io_errc::stream has category iostream
[modifica]Vedi anche
(C++11) | genera un codice di errore da un 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. (funzione) |
(C++11) | in possesso di un dipendente dalla piattaforma codice di errore Original: holds a platform-dependent error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe) |
(C++11) | il flusso IO codici di errore 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) |