std::fgetpos(3)
π
std::fgetpos(3) β C++ Standard Libary π
okay bestie, we are in the C++ Standard Libary manual, page std::fgetpos(3), and this one is short but lowkey iconic. Letβs get into it β¨
π NAME π
std::fgetpos β std::fgetpos. Thatβs the name. Thatβs the whole name. periodt π
πΈ Synopsis πΈ
Defined in header <cstdio>.
int fgetpos( std::FILE* stream, std::fpos_t* pos );
So what does it do? It 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. Like, do not try to read it as some normal number, bestie β that is not the vibe check it passes π
π Parameters π
streamβ the file stream to examine.posβ pointer to afpos_tobject to store the file position indicator to.
β¨ Return value β¨
Returns 0 upon success, nonzero value otherwise. Also sets errno on failure. So yeah, check that return value and check errno, no cap π«Ά
π¦ Example π¦
This section is incomplete.
Reason: no example.
not the incomplete example section π itβs giving βtrust me bestie, imagine a file stream hereβ π
π See also π
ftellβ returns the current file position indicator (function)fseekβ moves the file position indicator to a specific location in a file (function)fsetposβ moves the file position indicator to a specific location in a file (function)- C documentation for
fgetpos
π Category π
* Todo no example
and thatβs the page, bestie π source/version/date check: http://cppreference.com Β· 2024.06.10 Β· std::fgetpos(3) β bye, slay, and may your file positions be exactly where you left them πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms