std::basic_ifstream::open
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody> 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 ); |
(dal C++11) | |
Apre e collaboratori file con il flusso di file. Chiede
clear() in caso di successo o setstate(failbit) in caso di fallimento.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 prima versione chiama efficacemente
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 seconda versione chiama efficacemente
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.
Parametri
| filename | - | il nome del file da aprire
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 | - | specifica modalità di apertura flusso. E 'tipo di maschera di bit, le seguenti costanti sono definite:
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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Valore di ritorno
(Nessuno)
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.
Esempio
| This section is incomplete Reason: no example |
Vedi anche
controlla se il flusso è associato un file 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. (metodo pubblico) | |
chiude il file associato 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. (metodo pubblico) | |