Export (0) Print
Expand All
Expand Minimize

Compiler Error C2748

Error Message

managed array creation must have array size or array initializer

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

The following sample generates 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);
}

Community Additions

ADD
Show:
© 2014 Microsoft