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. |
Definido en la cabecera <cstdio>
|
||
int fwrite( const void* buffer, std::size_t size, std::size_t count, std::FILE* stream ); |
||
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.
Si los objetos no son
TriviallyCopyable
, el comportamiento no está definido .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 se produce un error, el valor resultante del indicador de posición del fichero para el flujo es
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.
indeterminate.
Contenido |
[editar] Parámetros
buffer | - | puntero al objeto primer objeto en la matriz para ser escrito
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 | - | tamaño de cada objeto
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 | - | el número de los objetos a ser escrito
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. |
[editar] Valor de retorno
Number of objects written successfully, which may be less than count
if an error occurred.
Si
size
o count
es cero, fwrite
devuelve cero y no realiza ninguna otra acción .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.
[editar] Ejemplo
Esta sección está incompleta Razón: sin ejemplo |
[editar] Ver también
(C++11) |
imprime la salida formateada para stdout, una secuencia de archivo o un tampón 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. (función) |
escribe una cadena de caracteres en una secuencia de archivo 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. (función) | |
lee un archivo 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. (función) | |
Documentacion C de fwrite
|