std::fseek
De 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>| Déclaré dans l'en-tête <cstdio>
|
||
int fseek( std::FILE* stream, long offset, int origin ); |
||
Définit l'indicateur de position du flux
stream fichier comme suit: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.
Si le
stream est ouvert en mode binaire, la nouvelle position est exactement offset octets mesurés à partir du début du fichier est origin est SEEK_SET, à partir de la position courante du fichier si origin est SEEK_CUR, et à partir de la fin du fichier si origin est SEEK_END. Certains flux binaires ne peuvent pas soutenir la 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.
Si le
stream est ouvert en mode texte, les seules valeurs prises en charge pour offset sont nuls (qui fonctionne avec n'importe quel origin) et une valeur retournée par un appel antérieur à std::ftell sur un flux associé avec le même dossier (qui fonctionne uniquement avec des origin SEEK_SET .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.
Outre la modification de l'indicateur de position,
fseek annule les effets de std::ungetc et efface le statut de fin de fichier, le cas échéant .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.
Si une lecture ou d'écriture d'erreur se produit, l'indicateur d'erreur du flux ( std::ferror) est définie et la position du fichier n'est pas affecté .
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.
Paramètres
| stream | - | déposer flux à modifier
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 | - | nombre de caractères à décaler la position par rapport à l'origine
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 | - | la position à laquelle on ajoute
offset. Il peut avoir l'une des valeurs suivantes: 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. |
Retourne la valeur
0 en cas de succès, valeur différente de zéro autrement .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.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
déplace l'indicateur de position de fichier à un emplacement spécifique dans un fichier 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. (fonction) | |
obtient l'indicateur de position 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. (fonction) | |
renvoie l'indicateur de position de fichier courant 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. (fonction) | |
déplace l'indicateur de position de fichier au début d'un fichier 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. (fonction) | |
C documentation for fseek
| |