std::basic_ifstream::open
De cppreference.com
< cpp | io | basic ifstream
|
|
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. |
| 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 ); |
(ya que 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.
Contenido |
[editar] 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[editar] 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.
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] 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. (miembro público función) | |
| 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. (miembro público función) | |