Name
fgetpos function — Returns file position
Synopsis
int fgetpos(FILE* stream, fpos_t* pos)
The fgetpos
function stores
stream
’s current position in the
object that pos
points to. The
only use for the position is to save it and pass it to fsetpos
to set the file’s position. You
cannot use the position arithmetically, e.g., to advance the
position by one character.
The return value is 0
for
success or nonzero for failure. If fgetpos
fails, it sets errno
.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.