411 REFERENCE · Wikibooks
C++ Programming/Code/Standard C Library/Functions/fread
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
fread
#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