std::basic_iostream
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <iostream>
|
||
| template< class CharT, |
||
类模板
basic_iostream提供了高层次的输入/输出操作流的支持。支持的操作包括:连续读取或写入和格式化。实现此功能的接口,提供由basic_streambuf类超过。它是通过访问basic_ios类.Original:
The class template
basic_iostream provides support for high level input/output operations on streams. The supported operations include sequential reading or writing and formatting. This functionality is implemented over the interface, provided by the basic_streambuf class. It is accessed through basic_ios class.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
两个专业为普通字符类型的定义
Original:
Two specializations for common character types are defined:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| Defined in header
<iostream> | |
| 类型
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 |
iostream
|
basic_iostream<char> |
wiostream
|
basic_iostream<wchar_t> |
[编辑] 会员类型
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
[编辑] 成员函数
| 构造对象 Original: constructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) | |
| [虚拟的] </ SPAN></div></div>
|
解构的对象 Original: destructs the object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虚拟公有成员函数) |
[编辑] 受保护的成员函数
| (C++11) |
移动给其他 basic_iostream Original: move-assigns another basic_iostream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) |
| (C++11) |
与其他 basic_iostream交流的状态 Original: exchanges the state with another basic_iostream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数) |
Inherited from std::basic_istream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 提取物格式的数据 Original: extracts formatted data 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_istream)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 提取字符 Original: extracts characters 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_istream)
| |
| 读取下一个字符,而不提取 Original: reads the next character without extracting it 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_istream)
| |
| unextracts一个字符 Original: unextracts a character 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_istream)
| |
| 字符到输入流 Original: puts character into input stream 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_istream)
| |
| 提取字符,直到给定的字符被发现 Original: extracts characters until the given character is found 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_istream)
| |
| 提取物和丢弃给定字符的字符,直到被发现 Original: extracts and discards characters until the given character is found 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_istream)
| |
| 提取的字符块 Original: extracts blocks of characters 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_istream)
| |
| 提取已经可用块的字符 Original: extracts already available blocks of characters 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_istream)
| |
| 通过上次未格式化输入操作提取的字符数返回 Original: returns number of characters extracted by last unformatted input operation 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_istream)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回输入位置指示器 Original: returns the input 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_istream)
| |
| sets the input position indicator (公共成员函数of std::basic_istream)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 与底层存储设备同步 Original: synchronizes with the underlying storage device 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_istream)
| |
Member classes
| implements basic logic for preparation of the stream for input operations (公共成员类of std::basic_istream)
| |
Inherited from std::basic_ostream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 插入格式化的数据 Original: inserts formatted data 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)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 插入一个字符 Original: inserts a character 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)
| |
| 插入的字符块 Original: inserts blocks of characters 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)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回的输出位置指示器 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)
| |
| 设置输出位置指示器 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)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 与底层存储设备同步 Original: synchronizes with the underlying storage device 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)
| |
Member classes
| 实现了基本的逻辑流输出操作的准备 Original: implements basic logic for preparation of the stream for output operations 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)
| |
Inherited from std::basic_ios
Member types
| 会员类型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
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. | |
| 检查,如果没有错误发生,即I / O操作都可以 Original: checks if no error has occurred i.e. I/O operations are available 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_ios)
| |
| 如果最终文件的检查已经达到了 Original: checks if end-of-file has been reached 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_ios)
| |
| 如果已经发生可恢复的错误检查 Original: checks if a recoverable error has occurred 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_ios)
| |
| 检查,如果已经发生了不可恢复的错误 Original: checks if a non-recoverable error has occurred 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_ios)
| |
| 检查如果有错误发生(代名词fail()) Original: checks if an error has occurred (synonym of fail()) 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_ios)
| |
| (至 C++11) (C++11 起) |
检查,如果没有发生错误(同义词!fail()) Original: checks if no error has occurred (synonym of !fail()) 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_ios)
|
| 返回状态标志 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. (公共成员函数of std::basic_ios)
| |
| 设置状态标志 Original: sets state flags 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_ios)
| |
| 清除错误和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. (公共成员函数of std::basic_ios)
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 格式化信息的副本 Original: copies formatting information 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_ios)
| |
| 管理的填充字符 Original: manages the fill character 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_ios)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| manages exception mask (公共成员函数of std::basic_ios)
| |
| 设置语言环境 Original: sets the locale 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_ios)
| |
| 管理相关的流缓冲 Original: manages associated stream buffer 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_ios)
| |
| 管理绑流 Original: manages tied stream 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_ios)
| |
| 缩小字符 Original: narrows characters 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_ios)
| |
| widens characters (公共成员函数of std::basic_ios)
| |
Inherited from std::ios_base
Member functions
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 管理格式的标志 Original: manages format flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
| 设置特定格式的标志 Original: sets specific format flag The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
| clears specific format flag (公共成员函数of std::ios_base)
| |
| 管理小数精度浮点运算 Original: manages decimal precision of floating point operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
| manages field width (公共成员函数of std::ios_base)
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 设置场景 Original: sets locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
| 返回当前的区域设置 Original: returns current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
Original: Internal extensible array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [静态的] </ SPAN></div></div>
|
返回一个程序范围内唯一的整数,它是安全使用指数PWORD()和iword() Original: returns a program-wide unique integer that is safe to use as index to pword() and iword() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员函数of std::ios_base)
|
| 调整大小的私人存储,如果必要的,访问long元素在给定的索引 Original: resizes the private storage if necessary and access to the long element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
| 调整大小的私人存储,如果必要的,访问void*元素在给定的索引 Original: resizes the private storage if necessary and access to the void* element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员函数of std::ios_base)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| registers event callback function (公共成员函数of std::ios_base)
| |
| [静态的] </ SPAN></div></div>
|
C + +和C IO库的设置是否是可互操作的 Original: sets whether C++ and C IO libraries are interoperable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共静态成员函数of std::ios_base)
|
Original: Member classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 流异常 Original: stream exception The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员类of std::ios_base)
| |
| 标准流对象进行初始化 Original: initializes standard stream objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成员类of std::ios_base)
| |
Original: Member types and constants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 类型
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 流开放的模式类型
有以下常量的定义:
Original: stream open mode type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 格式化标志类型
有以下常量的定义:
Original: formatting flags type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 流类型的状态
有以下常量的定义:
Original: state of the stream type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| seeking direction type
The following constants are also defined:
(的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 指定事件类型 Original: specifies event type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (枚举) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 回调函数类型 Original: callback function type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</div>
