What is >>> operation in C++

前端 未结 6 1033
半阙折子戏
半阙折子戏 2021-01-12 06:48

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

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

Does anyone know what is t

6条回答
  •  执笔经年
    2021-01-12 07:18

    >>> is not a part of C++. The blog contains code in 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.

提交回复
热议问题