Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::streamoff

      From cppreference.com
      <cpp‎ |io
       
       
       
      Defined in header<ios>
      typedef/*implementation-defined*/ streamoff;

      The typestd::streamoff is an implementation-definedsigned integral(since C++11) type of sufficient size to represent the maximum possible file size supported by the operating system.Typically, this is an alias forlonglong.(since C++11)

      It is used to represent offsets from stream positions (values of typestd::fpos). Astd::streamoff value constructed from-1 is also used to represent error conditions by some of the I/O library functions.

      [edit]Relationship with std::fpos

      • the difference between twostd::fpos objects is a value of typestd::streamoff
      • a value of typestd::streamoff may be added or subtracted fromstd::fpos yielding a differentstd::fpos.
      • a value of typestd::fpos is implicitly convertible tostd::streamoff (the conversion result is the offset from the beginning of the file).
      • a value of typestd::fpos is constructible from a value of typestd::streamoff

      [edit]See also

      represents absolute position in a stream or a file
      (class template)[edit]
      sets the input position indicator
      (public member function ofstd::basic_istream<CharT,Traits>)[edit]
      sets the output position indicator
      (public member function ofstd::basic_ostream<CharT,Traits>)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/io/streamoff&oldid=137665"

      [8]ページ先頭

      ©2009-2025 Movatter.jp