代码段:
static struct
{
static const unsigned char myConstArray[] =
{
50, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 58, 59, 60,
};
//more....
}_SomeValues;
这怎么可行? (抱怨在= a之后;缺少)
答案 0 :(得分:8)
更改为:
static struct
{
const unsigned char myConstArray[14];
} _SomeValues =
{
{
50, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 58, 59, 60,
}
};
答案 1 :(得分:1)
你不能在struct
中拥有静态变量答案 2 :(得分:1)