什么是>>>>在C ++中操作 [英] What is >>> operation in C++

查看:250
本文介绍了什么是>>>>在C ++中操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此博文< a>作者已建议以下作为错误修复:

In this blog post the author has suggested the following as the bug fix:

 int mid = (low + high) >>> 1;

有没有人知道这是什么>>>运算符?当然它不在以下操作符参考列表:

Does anyone know what is this >>> operator? Certainly its not there on the following operator reference list:

  • http://msdn.microsoft.com/en-us/library/x04xhy0h%28v=vs.71%29.aspx
  • http://www.cplusplus.com/doc/tutorial/operators/

这是什么,如何解决溢出问题?

What is it and how does that solve the overflow problem?

推荐答案

>>> 不是C ++的一部分。该博客包含Java中的代码。

>>> is not a part of C++. The blog contains code in Java.

查看Java在线教程这里按位移位运算符。它表示

Check out Java online tutorial here on Bitwise shift operators. It says


无符号右移位运算符>>>将零移动到最左边的位置,而 取决于符号扩展。

The unsigned right shift operator ">>>" shifts a zero into the leftmost position, while the leftmost position after ">>" depends on sign extension.

这篇关于什么是&gt;&gt;&gt;&gt;在C ++中操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆