SilverScreen Solid Modeler

fseek

fseek

Previous topic Next topic  

fseek

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

int fseek( FILE *stream, long offset, int origin )

 

FILE *fp;         /* stream pointer */

long  offset;     /* seek offset amount */

int   origin;     /* origin specifier */

 

 




Synopsis

#include "stdio.h"

 

The fseek function moves the file pointer for the file associated with fp to a location offset bytes a position specified by origin

 

 

Parameters

fp is an open stream pointer. offset is a long value. origin is one of the following (defined in stdio.h):

 

Name

Value

Meaning

SEEK_SET

0

seek from the beginning of the file

SEEK_CUR

1

seek from the current location in the file

SEEK_END

2

seek from the end of the file

 

 

Return Value

fseek returns 0 if successful, and EOF (-1) if not.

 

 

Comments

Seeking past the end-of file is legal.

 

 

See Also

ftell , fsetpos