这就是我正在做的事情:
const uint16_t LAYERS_RIGHT[TOTAL_LAYERS][NBROW][NBCOL] = {
{{c00, c10, c20, c30, c40, c50, c60},
{c01, c11, c21, c31, c41, c51, c61},
{c02, c12, c22, c32, c42, c52, c62},
{c03, c13, c23, c33, c43, c53, c63},
{c04, c14, c24, c34, c44, c54, c64},
{c05, c15, c25, c35, c45, c55, c65}}
/* blah blah */
};
const uint16_t LAYERS_LEFT[TOTAL_LAYERS][NBROW][NBCOL] = {
/* blah blah */
/* blah blah */
};
uint16_t *(LAYERS[TOTAL_LAYERS][NBROW][NBCOL]);
我的目标是尝试创建一个指向右侧结构或左侧结构的指针:
LAYERS = &LAYERS_RIGHT;
编译器说:
error: incompatible types in assignment of
'const uint16_t (*)[7][6][7] {aka const unsigned int (*)[7][6][7]}' to
'uint16_t* [7][6][7] {aka unsigned int* [7][6][7]}'
如何使我的代码工作?