fread [C++ Reference]
Keywords: c,io,fread
Date: 2008-10-14T15:42:01-0700

[[fread]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## fread

Syntax:

        #include <cstdio>
        int fread( void *buffer, size_t size, size_t num, FILE *stream );

The function fread() reads num number of objects (where each object is size bytes) and places them into the array pointed to by buffer.

The data comes from the given input stream.

The return value of the function is the number of things read. You can use feof or ferror to figure out if an error occurs.

Related Topics: fflush, fgetc, fopen, fputc, fscanf, fwrite, getc, feof, ferror

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •