Input/output manipulators
来自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. |
机械手辅助功能,使人们有可能使用operator<<或operator>>控制输入/输出流.
Original:
Manipulators are helper functions that make it possible to control input/output streams using operator<< or operator>>.
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.
调用不带参数的操纵(例如std::cout << std::boolalpha;或std::cin >> std::hex;)中实现的函数的引用来作为其唯一的参数流。重载basic_ostream::operator<<basic_istream::operator>>接受这些函数的指针.
Original:
The manipulators that are invoked without arguments (e.g. std::cout << std::boolalpha; or std::cin >> std::hex;) are implemented as functions that take a reference to a stream as their only argument. The special overloads of basic_ostream::operator<< and basic_istream::operator>> accept pointers to these functions.
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.
调用带参数的操纵(例如std::cout << std::setw(10);)的实现函数返回对象的类型不明确。这些机器人定义自己的
operator<<operator>>执行请求的操作.Original:
The manipulators that are invoked with arguments (e.g. std::cout << std::setw(10);) are implemented as functions returning objects of unspecified type. These manipulators define their own
operator<< or operator>> which perform the requested manipulation.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
<ios> | |
| 文字和数字表示的布尔值之间切换 Original: switches between textual and numeric representation of booleans The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 控制是否前缀用于指示数字基 Original: controls whether prefix is used to indicate numeric base The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 控制是否始终包含在浮点表示小数点 Original: controls whether decimal point is always included in floating-point representation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 控制是否 +符号用于与非负数Original: controls whether the + sign used with non-negative numbersThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 被跳过的输入控制是否前导空格 Original: controls whether leading whitespace is skipped on input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| controls whether uppercase characters are used with some output formats (函数) | |
| 控制输出是否每次操作后冲洗 Original: controls whether output is flushed after each operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 设置填充字符的位置 Original: sets the placement of fill characters 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: changes the base used for integer I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| (C++11) (C++11) |
使用的格式为浮点I / O Original: changes formatting used for floating-point I/O 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
<istream> | |
| 消耗的空白 Original: consumes whitespace 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
<ostream> | |
| 输出'\0' Original: outputs '\0' The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 刷新输出流 Original: flushes the output stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) | |
| 输出'\n'并刷新输出流 Original: outputs '\n' and flushes the output stream 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
<iomanip> | |
| 清除指定的ios_base标志 Original: clears the specified ios_base flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 设置指定的ios_base标志 Original: sets the specified ios_base flags 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: changes the base used for integer I/O The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 改变填充字符 Original: changes 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. (函数模板) | |
| 改变浮点精度 Original: changes floating-point precision The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| 改变宽度的下一个输入/输出字段 Original: changes the width of the next input/output field The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| (C++11) |
解析货币值 Original: parses a monetary value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
格式和输出的货币价值 Original: formats and outputs a monetary value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
解析一个日期/时间值的指定格式 Original: parses a date/time value of specified format The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |
| (C++11) |
格式和输出的日期/时间值,按指定的格式 Original: formats and outputs a date/time value according to the specified format The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数模板) |