给int型变量赋最大值

来源:互联网 发布:知天下资源吧不能进 编辑:程序博客网 时间:2024/05/01 10:47

const int max = 0x7fffffff;

在这个变量的32位中,符号位是0,其他位都是1。

0 0
原创粉丝点击