小编Eth*_*man的帖子

声明字节数组时的c ++语法错误

我试图声明一个字节数组,所以我可以通过它们并分别使用它们中的每一个.这是阵列

const BYTE keybyte[] = {
    0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
    0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
    0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57 0x58,
    0x59, 0x5A, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
    0x36, 0x37, 0x38, 0x39, 0x25, 0x27, 0x26, 0x28,
    0x0D, 0x20, 0x10, 0x11, 0x12, 0x18};
Run Code Online (Sandbox Code Playgroud)

由于某种原因,当我编译它给我这些错误:/

error C2143: syntax error : missing '}' before 'constant'
error C2143: syntax error : missing ';' before 'constant'
error C2059: syntax error : 'constant'
error C2143: syntax …
Run Code Online (Sandbox Code Playgroud)

c++ arrays syntax byte constants

2
推荐指数
1
解决办法
2438
查看次数

标签 统计

arrays ×1

byte ×1

c++ ×1

constants ×1

syntax ×1