std::basic_ios::setstate

来自cppreference.com

 
 
输入/输出库
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)
 
std::basic_ios
成员函数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ios::basic_ios
basic_ios::~basic_ios
国家职能
Original:
State functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ios::good
basic_ios::eof
basic_ios::fail
basic_ios::bad
basic_ios::operator!
basic_ios::operator bool
basic_ios::rdstate
basic_ios::setstate
basic_ios::clear
格式化
Original:
Formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ios::copyfmt
basic_ios::fill
杂项
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ios::exceptions
basic_ios::imbue
basic_ios::rdbuf
basic_ios::tie
basic_ios::narrow
basic_ios::widen
受保护的成员函数
Original:
Protected member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ios::init
basic_ios::move
basic_ios::swap
basic_ios::set_rdbuf
 
void setstate( iostate state );
设置流的错误标志state除了目前设置标志。从本质上要求clear(rdstate() | state)。可能会抛出一个异常.
Original:
Sets the stream error flags state in addition to currently set flags. Essentially calls clear(rdstate() | state). May throw an exception.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 参数

state -
流错误状态标志设置。它可以是一个组合的以下常量:
常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
goodbit
没有错误
Original:
no error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
badbit
无法收回的流错误
Original:
irrecoverable stream error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
failbit
输入/输出操作失败,(格式化或提取错误)
Original:
input/output operation failed (formatting or extraction error)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
eofbit
相关的输入序列中已达到文件结束
Original:
associated input sequence has reached end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
stream error state flags to set. It can be a combination of the following constants:
常数
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
goodbit
没有错误
Original:
no error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
badbit
无法收回的流错误
Original:
irrecoverable stream error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
failbit
输入/输出操作失败,(格式化或提取错误)
Original:
input/output operation failed (formatting or extraction error)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
eofbit
相关的输入序列中已达到文件结束
Original:
associated input sequence has reached end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 返回值

(无)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑] 为例

[编辑] 另请参阅

返回状态标志
Original:
returns state flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]
清除错误和EOF标志
Original:
clears error and eof flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(公共成员函数) [edit]