rewind
From cppreference.com
| 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 to fseek(stream, 0, SEEK_SET);, except that end-of-file and error indicators are cleared.
The function drops any effects from previous calls to ungetc.
Contents |
[edit] Parameters
| stream | - | file stream to modify |
[edit] Return value
(none)
[edit] Example
This example shows how to read a file twice
Run this code
Output:
0123456789 0123456789
[edit] See also
| moves the file position indicator to a specific location in a file (function) | |
| C++ documentation for rewind
| |