std::fpos

来自cppreference.com
< cpp | io

 
 
输入/输出库
I / O操纵
C-风格的I / O
缓冲区
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(过时了)
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
文件I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
字符串I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
阵列的I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(过时了)
ostrstream(过时了)
strstream(过时了)
类型
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error类的接口
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
Defined in header <ios>
template< class State >
class fpos;
专业化的类模板std::fpos识别流或在一个文件中的绝对位置。每个对象类型fpos持有的字节流中的位置(通常作为一个私有成员的类型std::streamoff)和当前的移动状态,State(通常是一个类型的值std::mbstate_t
Original:
Specializations of the class template std::fpos identify absolute positions in a stream or in a file. Each object of type fpos holds the byte position in the stream (typically as a private member of type std::streamoff) and the current shift state, a value of type State (typically std::mbstate_t).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
四个专业std::fpos
Original:
Four specializations of std::fpos are provided:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header <ios>
类型
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
streampos std::fpos<std::char_traits<char>::state_type>
u16streampos std::fpos<std::char_traits<char16_t>::state_type>
u32streampos std::fpos<std::char_traits<char32_t>::state_type>
wstreampos std::fpos<std::char_traits<wchar_t>::state_type>

[编辑] 成员函数

获取/设置值的移位状态
Original:
gets/sets the value of the shift state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数)
此外,下面的成员函数和运营商必须提供,虽然它的指定,如果他们是成员或非成员.
Original:
In addition, the following member functions and operators must be provided, although it's unspecified if they are members or non-member.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 构造函数接受一个参数的类型int
    Original:
    A constructor that accepts an argument of type int.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 的构造函数接受一个参数的类型std::streamoff。此构造还必须接受特殊的价值std::streamoff(-1):以这种方式构造的std::fpos传回的一些流操作来表示错误.
    Original:
    A constructor that accepts an argument of type std::streamoff. This constructor must also accept the special value std::streamoff(-1): the std::fpos constructed in this manner is returned by some stream operations to indicate errors.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • 转换操作符转换fposstd::streamoff的偏移量std::fpos(0)值等于.
    Original:
    A conversion operator that converts fpos to std::streamoff with the value equal to the offset from std::fpos(0).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • operator==比较两个对象的类型std::fpos和返回值的类型转换为bool
    Original:
    operator== that compares two objects of type std::fpos and returns a value of type convertible to bool
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • operator!=比较两个对象的类型std::fpos和返回值的类型转换为bool
    Original:
    operator!= that compares two objects of type std::fpos and returns a value of type convertible to bool
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • operator+operator+=可以添加std::streamoffstd::fpos
    Original:
    operator+ and operator+= which can add std::streamoff to std::fpos
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • operator-operator-=可以减去std::streamoffstd::fpos
    Original:
    operator- and operator-= which can subtract std::streamoff from an std::fpos
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • operator-可以减去两个对象的类型std::fpos产生std::streamoff
    Original:
    operator- which can subtract two objects of type std::fpos producing an std::streamoff
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[编辑] 另请参阅

表示相对文件/流的位置(偏离FPOS),足以代表任何文件的大小
Original:
represents relative file/stream position (offset from fpos), sufficient to represent any file size
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(的typedef)
返回的输出位置指示器
Original:
returns the output position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数of std::basic_ostream [edit]
设置输出位置指示器
Original:
sets the output position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数of std::basic_ostream [edit]
获取文件位置指示器
Original:
gets the file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]