Namespaces
Variants
Views
Actions

std::fseek

From cppreference.com
< cpp‎ | io‎ | c
Revision as of 17:48, 2 August 2011 by P12bot (Talk | contribs)

Template:cpp/io/c/sidebar

Defined in header <cstdio>
int fseek( FILE *stream, long offset, int origin );

Sets the file position indicator for the file stream stream to the value pointed to by pos. This function can be used to set the indicator beyond the actual end of the file, however, negative position values are not accepted.

Parameters

stream - file stream to modify
origin - position to which offset is added. It can have one of the following values,

{{param list item | offset | number of characters to shift the position relative to origin

Return value

Template:cpp upon success, nonzero value otherwise. Associated Template:cpp flag is cleared for the stream.

Template:see also

Template:cpp/io/c/dcl list fsetposTemplate:cpp/io/c/dcl list fgetposTemplate:cpp/io/c/dcl list ftellTemplate:cpp/io/c/dcl list rewind