std::basic_fstream::open
De cppreference.com
<metanoindex/>
<tbody> </tbody> void open( const char *filename, ios_base::openmode mode = ios_base::in|ios_base::out ); |
||
void open( const std::string &filename, ios_base::openmode mode = ios_base::in|ios_base::out ); |
(desde 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.
You can help to correct and verify the translation. Click here for instructions.
A primeira versão efetivamente chama
rdbuf()->open(filename, mode).Original:
The first version effectively calls
rdbuf()->open(filename, mode).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.
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.
You can help to correct and verify the translation. Click here for instructions.
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:
Original: specifies stream open mode. It is bitmask type, the following constants are defined:
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
(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.
You can help to correct and verify the translation. Click here for instructions.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
