#define A 0x0002000000000000
#define B 0x0003000000000000
typedef struct {
unsigned long long value1;
unsigned long long value2;
}test;
test test_array[] = { { A ,B}};
这个为什么总是提示integer constant is too large for ‘long’ type
...全文
2977打赏收藏
unsigned long long类型匹配问题
#defineA0x0002000000000000 #defineB0x0003000000000000 typedef struct { unsigned long long value1; unsigned long long value2; }test; test test_array[] = { { A ,B}}; 这个为什么总是提示integer constant is too large for ‘long’ type
#define A 0x0002000000000000uI64
#define B 0x0003000000000000uI64
C++ Integer Constants
Integer constants are constant data elements that have no fractional parts or exponents. They always begin with a digit. You can specify integer constants in decimal, octal, or hexadecimal form. They can specify signed or unsigned types and long or short types.