std::basic_fstream::open
Aus cppreference.com
< cpp | io | basic fstream
![]() | 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(constchar*filename, ios_base::openmode mode = ios_base::in|ios_base::out); | ||
void open(conststd::string&filename, ios_base::openmode mode = ios_base::in|ios_base::out); | (seit C++11) | |
Opens und assoziierten Datei mit dem Strom. Ruft clear() über Erfolg oder setstate(failbit) bei Ausfall .
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.
Die erste Version effektiv nennt 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.
Die zweite Version effektiv nennt 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.
Inhaltsverzeichnis |
[Bearbeiten]Parameter
filename | - | der Name der Datei, die geöffnet werden kann 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 | - | legt Stream offenen Modus. Es ist Bitmaske Typ sind die folgenden Konstanten definiert:
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. |
[Bearbeiten]Rückgabewert
(None)
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.
[Bearbeiten]Beispiel
This section is incomplete Reason: no example |
[Bearbeiten]Siehe auch
prüft, ob der Stream eine zugehörige Datei hat 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. (öffentliche Elementfunktion) | |
schließt die zugehörige Datei 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. (öffentliche Elementfunktion) |