编译器错误 C2739

“number”: 显式托管或 WinRT 数组维度必须介于 1 和 32 之间

数组维度不在 1 和 32 之间。

下面的示例生成 C2739,并演示如何修复此错误:

// C2739.cpp
// compile with: /clr
int main() {
   array<int, -1>^a;   // C2739
   // try the following line instead
   // array<int, 2>^a;
}