小编Gio*_*o A的帖子

(签名)多头的实际下限是多少?

检查长使用类型的限制

std::cout << std::numeric_limits<long long>::min();
Run Code Online (Sandbox Code Playgroud)

我得到-9223372036854775808

但是在编译以下代码时:

int main() {
   long long l;
   l=-9223372036854775808LL;
}
Run Code Online (Sandbox Code Playgroud)

我收到警告:

test.cpp:3:7: warning: integer constant is so large that it is unsigned.
test.cpp:3: warning: this decimal constant is unsigned only in ISO C90
Run Code Online (Sandbox Code Playgroud)

我错过了什么?非常感谢您的帮助.

乔治

c++ g++

6
推荐指数
1
解决办法
2474
查看次数

标签 统计

c++ ×1

g++ ×1