std::basic_ifstream::open
De cppreference.com
|
|
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
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 ); |
(desde C++11) | |
Abre el archivo y asociados con la secuencia de archivo. Llamadas
clear() en el éxito o en el fracaso 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.
La primera versión eficazmente llama
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.
You can help to correct and verify the translation. Click here for instructions.
La segunda versión eficazmente llama
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 | - | el nombre del archivo que se abrirá
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 el modo de transmisión abierta. Es el tipo de máscara de bits, las siguientes constantes son 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
(Ninguno)
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.
Ejemplo
| Esta sección está incompleta Razón: sin ejemplo |
Ver también
Comprueba si el flujo tiene un archivo asociado 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. (función miembro pública) | |
cierra el archivo asociado 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. (función miembro pública) |