Diferenças entre edições de "cpp/io/io errc/make error code"
Da cppreference.com
m (uma edição: Translate from the English version) |
m (Use {{lc}}. Update links. Various fixes.) |
||
(Uma edição intermédia de um utilizador não apresentada) | |||
Linha 1: | Linha 1: | ||
{{tr_note}} | {{tr_note}} | ||
− | {{cpp/title|make_error_code{{ | + | {{cpp/title|make_error_code{{small|(std::io_errc)}}}} |
{{cpp/io/io_errc/navbar}} | {{cpp/io/io_errc/navbar}} | ||
{{ddcl | header=ios | notes={{mark since c++11}}| | {{ddcl | header=ios | notes={{mark since c++11}}| | ||
Linha 6: | Linha 6: | ||
}} | }} | ||
− | {{tr|Constrói um objeto {{ | + | {{tr|Constrói um objeto {{|std::error_code}} de um valor de {{|std::io_errc}} tipo como se por {{c|return std::error_code(static_cast<int>(e), std::iostream_category())}}. Esta função é chamada pelo construtor de {{|std::error_code}} quando dado um argumento {{|std::io_errc}}.|Constructs an {{|std::error_code}} object from a value of type {{|std::io_errc}} as if by {{c|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.}} |
===Parâmetros=== | ===Parâmetros=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| e |{{tr| número de código de erro| error code number}}}} |
− | {{ | + | {{end}} |
===Valor de retorno=== | ===Valor de retorno=== | ||
− | {{tr|Um valor de {{ | + | {{tr|Um valor de {{|std::error_code}} tipo que contém o número do código de erro a partir de {{tt|e}} associado com a categoria de erro {{c|"iostream"}}.|A value of type {{|std::error_code}} that holds the error code number from {{tt|e}} associated with the error category {{c|"iostream"}}.}} |
===Exemplo=== | ===Exemplo=== | ||
Linha 33: | Linha 33: | ||
===Veja também=== | ===Veja também=== | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| cpp/error/error_code/make_error_code}} |
− | {{ | + | {{| cpp/error/error_code}} |
− | {{ | + | {{| cpp/io/io_errc}} |
− | {{ | + | {{end}} |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |
Edição actual desde as 09h24min de 2 de julho de 2013
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido no cabeçalho <ios>
|
||
std::error_code make_error_code( std::io_errc e ); |
(desde C++11) | |
Constrói um objeto std::error_code de um valor de std::io_errc tipo como se por return std::error_code(static_cast<int>(e), std::iostream_category()). Esta função é chamada pelo construtor de std::error_code quando dado um 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.
Índice |
[editar] Parâmetros
e | - | número de código de erro
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
Um valor de std::error_code tipo que contém o número do código de erro a partir de
e
associado com a categoria de erro "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] Exemplo
#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'; }
Saída:
Error code from io_errc::stream has category iostream
[editar] Veja também
(C++11) |
cria um código de erro a partir de um 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. (função) |
(C++11) |
possui um código de erro depende da plataforma 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) |
O erro de IO códigos de fluxo 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) |