| Types and objects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <stdio.h> | ||
void rewind(FILE*stream); | ||
Moves the file position indicator to the beginning of the given file stream.
The function is equivalent tofseek(stream,0,SEEK_SET);, except that end-of-file and error indicators are cleared.
The function drops any effects from previous calls toungetc.
Contents |
| stream | - | file stream to modify |
(none)
This example shows how to read a file twice
Output:
01234567890123456789
| moves the file position indicator to a specific location in a file (function)[edit] | |
C++ documentation forrewind | |