编译器错误 C2118

负下标

定义数组大小的值大于最大数组大小或小于零。

以下示例生成 C2118:

// C2118.cpp
int main() {
   int array1[-1];   // C2118
   int array2[3];   // OK
}