Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | io‎ | c
m (Shorten template names. Use {{lc}} where appropriate.)
m (Update links.)
Line 22: Line 22:
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/io/c/dcl list fgetpos}}
+
{{dsc inc | cpp/io/c/dsc fgetpos}}
{{dsc inc | cpp/io/c/dcl list ftell}}
+
{{dsc inc | cpp/io/c/dsc ftell}}
{{dsc inc | cpp/io/c/dcl list fseek}}
+
{{dsc inc | cpp/io/c/dsc fseek}}
 
{{dsc see c | c/io/fsetpos}}
 
{{dsc see c | c/io/fsetpos}}
 
{{dsc end}}
 
{{dsc end}}

Revision as of 22:01, 31 May 2013

 
 
 
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>
int fsetpos( std::FILE* stream, const std::fpos_t* pos );

Sets the file position indicator and the multibyte parsing state (if any) for the C file stream stream according to the value pointed to by pos.

Besides establishing new parse state and position, a call to this function undoes the effects of std::ungetc and clears the end-of-file state, if it is set.

If a read or write error occurs, the error indicator (std::ferror)for the stream is set.

Parameters

stream - file stream to modify
pos - pointer to a fpos_t object obtained from std::fgetpos called on a stream associated with the same file

Return value

0 upon success, nonzero value otherwise. Also, sets errno on failure.

See also

gets the file position indicator
(function) [edit]
returns the current file position indicator
(function) [edit]
moves the file position indicator to a specific location in a file
(function) [edit]
C documentation for fsetpos