创建托管数组或 WinRT 数组时必须提供数组大小或数组初始值设定项
托管数组或 WinRT 数组的格式不正确。 有关详细信息,请参阅 数组。
下面的示例生成 C2748,并演示如何修复此错误:
// C2748.cpp
// compile with: /clr
int main() {
array<int> ^p1 = new array<int>(); // C2748
// try the following line instead
array<int> ^p2 = new array<int>(2);
}