当我尝试像这样声明一个global二维数组时C++:
int maxX = 10;
int maxZ = 10;
SDL_Rect mapX[maxX][maxZ];
Run Code Online (Sandbox Code Playgroud)
我得到一个错误说 error: variable-size type declared outside of any function
可能重复:
C中整数除法的行为是什么?
为什么这行代码没有返回任何内容?
float i = 10/3;
if (i>3) cout << i;
Run Code Online (Sandbox Code Playgroud)
如果有帮助,请使用CodeBlocks编译器.