我知道大多数运算符的名称,但不确定operator<<
和operator>>
是什么。
即
operator=() // the assignment operator
operator==() // the equality of comparison operator
operator++() // the increment operator
operator--() // decrement operator etc.
operator<() // the less-than operator
以此类推。
发布于 2010-07-19 21:56:01
<<
左移
>>
右移
发布于 2010-07-19 21:57:59
<<
既是插入运算符又是左移运算符。
>>
是提取运算符和右移运算符。
在iostream的上下文中,它们被认为是流插入/提取。在比特移位的上下文中,它们是左移和右移。
发布于 2010-07-19 21:56:26
<< = Bitwise left shift
>> = Bitwise right shift
https://stackoverflow.com/questions/3281666
复制相似问题