Read from stream
Remark | These functions are not supported by the debugging functions which CS+ provides. |
[Classification]
Standard library
[Syntax]
#include <stdio.h>
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
[Return value]
The number of elements that were input (nmemb) is returned.
Error return does not occur.
[Description]
This function inputs nmemb elements of size from the input stream pointed to by stream and stores them in ptr. Only the standard input/output stdin can be specified for stream.
[Example]
#include <stdio.h>
void func(void) {
struct {
int c;
double d;
} buf[10];
fread(buf, sizeof(buf[0]), sizeof(buf) / sizeof(buf [0]), stdin);
}
|