cpp/io/c/fseek

Sets the file position indicator for the file stream.

If the is open in binary mode, the new position is exactly  bytes measured from the beginning of the file if  is seek_set, from the current file position if  is seek_cur, and from the end of the file if  is seek_end. Binary streams are not required to support seek_end, in particular if additional null bytes are output.

If the is open in text mode, the only supported values for  are zero (which works with any ) and a value returned by an earlier call to std on a stream associated with the same file (which only works with  of seek_set).

If the is wide-oriented, the restrictions of both text and binary streams apply (result of std is allowed with seek_set and zero offset is allowed from seek_set and seek_cur, but not seek_end).

In addition to changing the file position indicator, undoes the effects of std and clears the end-of-file status, if applicable.

If a read or write error occurs, the error indicator for the stream (std) is set and the file position is unaffected.

Return value
upon success, nonzero value otherwise.