fgetpos

Record the current stream position.

int fgetpos (FILE * stream, fpos_t * pos);

Required Header
<stdio.h>

Return Value

This function returns zero if the operation was successful. -1 indicates an error.

Parameters

stream

  A pointer to the open FILE structure

pos

  A pointer to the an fpos_t structure

Remarks

The fgetpos function stores the current position of stream in a library specific structure which is to be used only with the function fsetpos.

Stream I/O Routines

See Also    fseek, fsetpos, ftell, _lseek, rewind, _tell