# std::fpos_t

> C++ Atlas: `cppatlas.com/w/cpp/io/c/fpos_t` | Source: https://en.cppreference.com/w/cpp/io/c/fpos_t | Domain: Input/output

std::fpos_t is a non-array complete object type, can be used to store (by std::fgetpos) and restore (by std::fsetpos) the position and multibyte parser state (if any) for a C stream.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <cstdio>
typedef /* implementation-defined */ fpos_t;
```

`std::fpos_t` is a non-array complete object type, can be used to store (by `std::fgetpos`) and restore (by `std::fsetpos`) the position and multibyte parser state (if any) for a C stream.

The multibyte parser state of a wide-oriented C stream is represented by a `std::mbstate_t` object, whose value is stored as part of the value of a `std::fpos_t` object by `std::fgetpos`.

### See also

- [`fgetpos`](https://en.cppreference.com/w/cpp/io/c/fgetpos): gets the file position indicator (function)
- [`fsetpos`](https://en.cppreference.com/w/cpp/io/c/fsetpos): moves the file position indicator to a specific location in a file (function)
- [`mbstate_t`](https://en.cppreference.com/w/cpp/string/multibyte/mbstate_t): conversion state information necessary to iterate multibyte character strings (class)
- [`fpos`](https://en.cppreference.com/w/cpp/io/fpos): represents absolute position in a stream or a file (class template)
- [C documentation for `fpos_t`](https://en.cppreference.com/w/c/io/fpos_t)

---
Attribution: content from https://en.cppreference.com/w/cpp/io/c/fpos_t (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.