std::fseek
Aus cppreference.com
|
|
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. |
<metanoindex/>
<tbody> </tbody>| definiert in Header <cstdio>
|
||
int fseek( std::FILE* stream, long offset, int origin ); |
||
Stellt die Position in der Datei Indikator für die Datei-Stream
stream wie folgt:Original:
Sets the file position indicator for the file stream
stream as follows: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.
Wenn die
stream offen ist im binären Modus, ist die neue Position genau offset Bytes vom Beginn der Datei gemessene origin ist SEEK_SET, aus der aktuellen Position in der Datei, wenn origin SEEK_CUR, und von dem Ende der Datei, wenn origin ist SEEK_END wird. Einige binäre Datenströme unterstützt möglicherweise nicht die SEEK_END .Original:
If the
stream is open in binary mode, the new position is exactly offset bytes measured from the beginning of the file is origin is SEEK_SET, from the current file position if origin is SEEK_CUR, and from the end of the file if origin is SEEK_END. Some binary streams may not support the SEEK_END.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.
Wenn die
stream ist offen im Text-Modus, sind die einzigen unterstützten Werte für offset Null (das funktioniert mit jedem origin) und ein Wert, der von einem früheren Aufruf std::ftell auf einen Strom mit der gleichen Akte (die nur mit origin der SEEK_SET assoziiert .Original:
If the
stream is open in text mode, the only supported values for offset are zero (which works with any origin) and a value returned by an earlier call to std::ftell on a stream associated with the same file (which only works with origin of SEEK_SET.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.
Zusätzlich zur Änderung der Datei Stellungsanzeige, rückgängig gemacht
fseek die Auswirkungen der std::ungetc und löscht die end-of-file-Status, falls zutreffend .Original:
In addition to changing the file position indicator,
fseek undoes the effects of std::ungetc and clears the end-of-file status, if applicable.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.
Wenn ein Lese-oder Schreibzugriff Fehler auftritt, den Fehler für den Stream ( std::ferror) gesetzt ist, und die Datei Position unbeeinflusst .
Original:
If a read or write error occurs, the error indicator for the stream (std::ferror) is set and the file position is unaffected.
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.
Parameter
| stream | - | Datei-Stream zu ändern
Original: file stream to modify The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| offset | - | Anzahl der Zeichen, die Position relativ zum Ursprung zu verschieben
Original: number of characters to shift the position relative to origin The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| origin | - | an welche Position
offset zugegeben. Es kann eine der folgenden Werte haben: SEEK_SET, SEEK_CUR, SEEK_ENDOriginal: position to which offset is added. It can have one of the following values: SEEK_SET, SEEK_CUR, SEEK_ENDThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Rückgabewert
0 auf Erfolg, Wert ungleich Null sonst .Original:
0 upon success, nonzero value otherwise.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.
Beispiel
| This section is incomplete Reason: no example |
Siehe auch
verschiebt die Datei Positionsanzeiger zu einer bestimmten Position in einer Datei Original: moves the file position indicator to a specific location in a file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
erhält die Datei Stellungsanzeige Original: gets the file position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
liefert die aktuelle Position in der Datei-Anzeige Original: returns the current file position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
verschiebt die Datei Stellungsanzeige zum Anfang in einer Datei Original: moves the file position indicator to the beginning in a file The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
C documentation for fseek
| |