我知道大多数运营商的名字,但不知道什么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
Run Code Online (Sandbox Code Playgroud)
等等......
Sco*_*ord 38
<<既是插入算子又是左移算子.
>>是提取算子和右移算子.
在iostreams的上下文中,它们被认为是流插入/提取.在位移的情况下,它们是左移和右移.
Mit*_*eat 18
<< 左移
>> 右转