×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

请帮我看一下以下这段g++编译的警告是什么意思:

./src/ClassName.cpp: In method `void ClassName::write(unsigned int, Class1 *)':
./src/ClassName.cpp:921: warning: decimal integer constant is so large that it is unsigned
./src/ClassName.cpp: In method `bool ClassName::read(uInt32 *, Class1 *)':
./src/ClassName.cpp:956: warning: decimal integer constant is so large that it is unsigned
./src/ClassName.cpp: In method `uInt32 ClassName::read(unsigned char **, Class1 *)':
./src/ClassName.cpp:988: warning: decimal integer constant is so large that it is unsigned

这个decimal integer constant 指的是哪个变量? unsigned是指unsigned int吗?该段程序已在VC++下编译通过。
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 请帮我看一下以下这段g++编译的警告是什么意思:
    ./src/ClassName.cpp: In method `void ClassName::write(unsigned int, Class1 *)':
    ./src/ClassName.cpp:921: warning: decimal integer constant is so large that it is unsigned
    ./src/ClassName.cpp: In method `bool ClassName::read(uInt32 *, Class1 *)':
    ./src/ClassName.cpp:956: warning: decimal integer constant is so large that it is unsigned
    ./src/ClassName.cpp: In method `uInt32 ClassName::read(unsigned char **, Class1 *)':
    ./src/ClassName.cpp:988: warning: decimal integer constant is so large that it is unsigned

    这个decimal integer constant 指的是哪个变量? unsigned是指unsigned int吗?该段程序已在VC++下编译通过。
    • 你到921 行去看一下不就得了。int 型值太大了。