Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/io/c/rewind"

From cppreference.com
< cpp‎ | io‎ | c
m (Text replace - "/sidebar" to "/navbar")
m (std:: and minor detail)
Line 2: Line 2:
 
{{cpp/io/c/navbar}}
 
{{cpp/io/c/navbar}}
 
{{ddcl | header=cstdio |
 
{{ddcl | header=cstdio |
void rewind( FILE *stream );
+
void rewind( std::FILE* stream );
 
}}
 
}}
  
Moves the file position indicator to the beginning of the given file stream. {{c|EOF}} and error flags are also cleared.  
+
Moves the file position indicator to the beginning of the given file stream as if by {{c|std::fseek(stream, 0L, SEEK_SET)}}, and clears the end-of-file and the error indicators on {{tt|stream}}.
  
 
===Parameters===
 
===Parameters===
Line 14: Line 14:
 
===Return value===
 
===Return value===
 
(none)
 
(none)
 +
 +
===Example===
 +
{{example|
 +
| code=
 +
| output=
 +
}}
  
 
===See also===
 
===See also===

Revision as of 12:03, 28 September 2012

 
 
 
C-style I/O
Types and objects
Functions
File access
Direct input/output
Unformatted input/output
Formatted input
(C++11)(C++11)(C++11)    
(C++11)(C++11)(C++11)    
 
Defined in header <cstdio>
void rewind( std::FILE* stream );

Moves the file position indicator to the beginning of the given file stream as if by std::fseek(stream, 0L, SEEK_SET), and clears the end-of-file and the error indicators on stream.

Contents

Parameters

stream - file stream to modify

Return value

(none)

Example

See also

Template:cpp/io/c/dcl list fseek
C documentation for rewind