当我尝试编译以下内容时:
bool matrix[h][w];
bool c = 0;
switch(1) // was close?
{
case matrix[y][x-1]: // up 1
case matrix[y-2][x-1]: // down 1
case matrix[y-1][x]: // right 1
case matrix[y][x-2]: // left 1
c = 1;
break;
}
Run Code Online (Sandbox Code Playgroud)
它回来了the value of 'matrix' is not usable in a constant expression.我究竟做错了什么?