int max = ~0; What does it mean?

前端 未结 8 2094
灰色年华
灰色年华 2021-01-19 03:46

int max = ~0;

What does it mean?

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-19 04:39

    The ~ operator is a bit inverse, so ~0 gives you an integer value with all ones (in binary).

提交回复
热议问题