Namespaces
Variants
Views
Actions

std::fgetpos

From cppreference.com
< cpp‎ | io‎ | c
Revision as of 14:38, 29 November 2022 by Space Mission (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
C-style I/O
Types and objects
Functions
File access
Direct input/output
Unformatted input/output
Formatted input
(C++11)(C++11)(C++11)    
(C++11)(C++11)(C++11)    
 
Defined in header <cstdio>
int fgetpos( std::FILE* stream, std::fpos_t* pos );

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 std::fsetpos.

Contents

[edit] Parameters

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

[edit] Return value

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

[edit] Example

[edit] See also

returns the current file position indicator
(function) [edit]
moves the file position indicator to a specific location in a file
(function) [edit]
moves the file position indicator to a specific location in a file
(function) [edit]
C documentation for fgetpos