std::fwrite
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 fwrite( const void* buffer, std::size_t size, std::size_t count, std::FILE* stream ); |
||
Rédige des objets
count de la buffer tableau donné le flux de sortie stream comme par reinterepreting chaque objet comme un tableau de unsigned char et les appels std::fputc size fois pour chaque objet à écrire ces unsigned chars en stream, dans l'ordre. L'indicateur de position de fichier pour le flux avance le nombre de caractères écrits .Original:
Writes up to
count objects from the given array buffer to the output stream stream as if by reinterepreting each object as an array of unsigned char and calling std::fputc size times for each object to write those unsigned chars into stream, in order. The file position indicator for the stream is advanced by the number of characters written.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 les objets ne sont pas
TriviallyCopyable, le comportement est indéfini .Original:
If the objects are not
TriviallyCopyable, the behavior is undefined.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 erreur se produit, la valeur résultante de l'indicateur de position du flux est
Original:
If an error occurs, the resulting value of the file position indicator for the stream is
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.
indéterminée .
Original:
indeterminate.
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
| buffer | - | pointeur vers l'objet premier objet dans le tableau à écrire
Original: pointer to the first object object in the array to be written The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| size | - | taille de chaque objet
Original: size of each object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| count | - | le nombre des objets à écrire
Original: the number of the objects to be written The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Retourne la valeur
Nombre d'objets écrits avec succès, ce qui peut être inférieure à
count si une erreur est survenue .Original:
Number of objects written successfully, which may be less than
count if an error occurred.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
size ou count est égal à zéro, fwrite renvoie zéro et n'effectue aucune autre action .Original:
If
size or count is zero, fwrite returns zero and performs no other action.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
(C++11) |
impressions en forme de sortie de stdout, un flux de fichier ou d'un tampon Original: prints formatted output to stdout, a file stream or a buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) |
écrit une chaîne de caractères dans un flux fichier Original: writes a character string to a file stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction) | |
lit un fichier Original: reads from 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 fwrite
| |