fgetpos

From cppreference.com
< c‎ | io
 
 
File input/output


Functions
File access
Direct input/output
Unformatted input/output
(C95)(C95)
(C95)
(C95)(C95)
(C95)
(C95)
Formatted input
Formatted output
File positioning
fgetpos
Error handling
Operations on files
 
Defined in header <stdio.h>
int fgetpos( FILE          *stream, fpos_t          *pos );
(until C99)
int fgetpos( FILE *restrict stream, fpos_t *restrict pos );
(since C99)

Obtains the file position indicator and the current parse state (if any) for the file stream stream and stores them in the object pointed to by pos. The value stored is only meaningful as the input to fsetpos.


Parameters

stream - file stream to examine
pos - pointer to a fpos_t object to store the file position indicator to

Return value

0 upon success, nonzero value otherwise.