cpp/io/c/fgetpos

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

Return value
upon success, nonzero value otherwise. Also sets errno on failure.