由于编译器默认数据都是int型,所以我们写1<<31 不是0x80000000,而是负数,所以会提示out of range。 解决方法:给1进行强制转换,((unsigned int)1<<31) 这样问题就解决了