Skip to content

Latest commit

 

History

History
25 lines (21 loc) · 695 Bytes

compiler-error-c2748.md

File metadata and controls

25 lines (21 loc) · 695 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2748
Compiler Error C2748
11/04/2016
C2748
C2748
b63ac78b-a200-499c-afea-15af1a1e819e

Compiler Error C2748

managed or WinRT array creation must have array size or array initializer

A managed or WinRT array was ill formed. For more information, see array.

The following sample generates C2748 and shows how to fix it:

// 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);
}