"my_ifstream >> my_char"在哪里记录?
Where is "my_ifstream >> my_char" documented?
我正在使用"cin>> my_char"在我尝试解析的输入记录中删除":"。下面是一个最小的例子。
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
using namespace std;
int main () {
char c;
int x, y;
cin >> hex >> x >> hex >> c >> y;
cout << "x = " << x << "ny = " << y << "n";
}
和示例用法:
rc@timecube:/tmp$ g++ test.cpp && echo "0000a:ffff" | ./a.out
x = 10
y = 65535
这段代码完全符合我的需求,但我不明白为什么。我希望看到类似的东西:
istream& operator>> (char& val);
在 istream 参考中,但我没有。
那么这种行为是如何记录的呢?
在自由函数下。
并非所有运营商都是会员!
相关文章:
- EASTL矢量<向量<int>>连续的
- 在反转字符串'my.name.is'时,我得到的输出为"is@.name.my"。我不明白'@'是从哪里来的
- My Project的属性配置正确,但Visual Studio仍然无法打开包含头文件
- C - 创建矢量&lt; vector&lt; double&gt;&gt;矩阵具有分配而不是inizializ
- C 字符串比较“祝您好运”&gt;“再见”
- 为什么将此对向量&lt; map&lt; int,int&gt;&gt;中的地图进行更新.失败
- C :对矢量进行排序&lt; struct&gt;(结构有2个整数)基于结构的整数之一
- C 操作员&gt;&gt;与突变器过载
- 明确的专业化“ CheckIntmap&lt;&gt;”实例化
- 是否需要使用 - &gt;运算符在C 中调用成员函数时
- 什么是模板&lt;&gt;inline bla bla
- 编辑C Qlist&lt; object*&gt; gt;QML代码和一些QML警告中的模型
- eigen :: llt&lt;eigen :: matrixxd&gt;具有不完整的类型
- 错误,包括&lt; ctype&gt;在原子上使用C 11
- 错误c++visual studio c2227左侧'->;Init';必须指向类/结构/联合/泛型类型
- std::vector<;uint8_t>;当C++11/14启用时,手动复制而不是调用memcpy
- ``这个''不能用this-&gt;指针变量
- 如何加入向量&lt; int&gt;到C 中的单个INT
- "directory containing symbolic versions of my app's shared libraries"的位置(ndk-stack)
- 是std :: set&lt; std :: future&gt;不可能存在