我正在使用以下代码。
const int X_ORIGIN = 1233086;
const int Y_ORIGIN = -4728071;
const int Z_ORIGIN = 4085704;
const int xyzOrigin[NUM_DIMENSIONS] = {X_ORIGIN, Y_ORIGIN, Z_ORIGIN};
当我编译它时,GCC 给了我以下错误。
Transformations.h:16:1: error: initializer element is not constant
这是什么意思?我该如何修复我的代码?
NUM_DIMENSIONS
在任何地方都没有定义,并且这个程序中没有第 16 行。它无法重现。 - Toby Speight