×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

请帮我看一下以下这段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 型值太大了。