FreeBSD Manual Pages
std::fpos::state(3) C++ Standard Libary std::fpos::state(3) NAME std::fpos::state - std::fpos::state Synopsis State state() const; (1) void state( State st ); (2) Manages the file position state. 1) Returns the value of the file position state 2) Replaces the file position state with the value of st. For the specializations of std::fpos that are used in the standard library, State is always std::mbstate_t Parameters st - new value for the state Return value 1) the current value of the fpos state 2) (none) Example // Run this code #include <iostream> #include <sstream> #include <cwchar> int main() { std::istringstream s("test"); std::mbstate_t st = s.tellg().state(); if(std::mbsinit(&st)) std::cout << "The stream is in the initial shift state\n"; } Output: The stream is in the initial shift state See also conversion state information necessary to iterate multi- byte character mbstate_t strings (class) http://cppreference.com 2022.07.31 std::fpos::state(3)
NAME | Synopsis | Parameters | Return value | Example | Output: | See also
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::fpos::state&sektion=3&manpath=FreeBSD+Ports+15.0>
