Espaços nominais
Variantes
Acções

std::make_error_code(std::io_errc)

Da cppreference.com
< cpp‎ | io‎ | io errc
Revisão das 16h47min de 29 de outubro de 2012 por P12 (discussão | contribs)

 
 
De entrada / saída da biblioteca
I / O manipuladores
C estilo de I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleta)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstrações
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cordas I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Matriz de I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleta)
(obsoleta)
(obsoleta)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Interface de categoria de erro
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(C++11)
 
std::io_errc
Classes auxiliares
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Funções auxiliares
Original:
Helper functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
make_error_code(std::io_errc)
 
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.

Índice

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.

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.

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

Veja também

Predefinição:cpp/error/error code/dcl list make error codePredefinição:cpp/error/dcl list error codePredefinição:cpp/io/dcl list io errc