首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >"operator<<“叫什么?

"operator<<“叫什么?
EN

Stack Overflow用户
提问于 2010-07-19 21:54:59
回答 6查看 31.5K关注 0票数 22

我知道大多数运算符的名称,但不确定operator<<operator>>是什么。

代码语言:javascript
复制
operator=() // the assignment operator
operator==() // the equality of comparison operator
operator++() // the increment operator
operator--() // decrement operator etc.
operator<() // the less-than operator

以此类推。

EN

回答 6

Stack Overflow用户

回答已采纳

发布于 2010-07-19 21:56:01

<<左移

>>右移

票数 19
EN

Stack Overflow用户

发布于 2010-07-19 21:57:59

<<既是插入运算符又是左移运算符。

>>是提取运算符和右移运算符。

在iostream的上下文中,它们被认为是流插入/提取。在比特移位的上下文中,它们是左移和右移。

票数 40
EN

Stack Overflow用户

发布于 2010-07-19 21:56:26

代码语言:javascript
复制
<< = Bitwise left shift
>> = Bitwise right shift
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3281666

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档