Espaços nominais
Variantes
Acções

std::basic_ifstream::open

Da cppreference.com
< cpp‎ | io‎ | basic ifstream

 
 
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.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(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.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
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.
basic_ifstream
basic_ofstream
basic_fstream
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.
basic_istringstream
basic_ostringstream
basic_stringstream
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.
istrstream(obsoleta)
ostrstream(obsoleta)
strstream(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.
streamoff
streamsize
fpos
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.
iostream_category(C++11)
io_errc(C++11)
 
std::basic_ifstream
Funções de membro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream::basic_ifstream
basic_ifstream::operator=(C++11)
basic_ifstream::swap(C++11)
basic_ifstream::rdbuf
Operações de arquivo
Original:
File operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream::is_open
basic_ifstream::open
basic_ifstream::close
Não-membros funções
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream::swap(std::basic_ifstream)(C++11)
 
void open( const char *filename,
           ios_base::openmode mode = ios_base::in );
void open( const std::string &filename,                                  
           ios_base::openmode mode = ios_base::in );
(a partir do C++ 11)
Abre e associados arquivo com o fluxo de arquivo. clear() chama de sucesso ou fracasso em setstate(failbit).
Original:
Opens and associates file with the file stream. Calls clear() on success or setstate(failbit) on failure.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A primeira versão efetivamente chama rdbuf()->open(filename, mode | ios_base::in).
Original:
The first version effectively calls rdbuf()->open(filename, mode | ios_base::in).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A segunda versão efetivamente chama open(filename.c_str(), mode).
Original:
The second version effectively calls open(filename.c_str(), mode).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Parâmetros

filename -
o nome do arquivo a ser aberto
Original:
the name of the file to be opened
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mode -
especifica o modo de fluxo aberto. Ele é o tipo de máscara de bits, as seguintes constantes são definidas:
Constante
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
app
procurar o fim do fluxo antes de cada gravação
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
abrir em modo binário
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
Abrir para leitura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
abrir para escrita
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
descartar o conteúdo da corrente durante a abertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
procurar o fim do fluxo imediatamente depois de aberto
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
specifies stream open mode. It is bitmask type, the following constants are defined:
Constante
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
app
procurar o fim do fluxo antes de cada gravação
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
abrir em modo binário
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
Abrir para leitura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
abrir para escrita
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
descartar o conteúdo da corrente durante a abertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
procurar o fim do fluxo imediatamente depois de aberto
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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

(Nenhum)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

[editar] Veja também

Verifica se o fluxo tem um arquivo associado
Original:
checks if the stream has an associated file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]
fecha o arquivo associado
Original:
closes the associated file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função pública membro) [edit]