This topic has not yet been rated - Rate this topic

Compiler Error C3186

multi-dimensional native array is not allowed

A native multidimensional array was declared incorrectly.

The following sample generates C3186:

// C3186.cpp
// compile with: /clr
#using <mscorlib.dll>
int main()
{
   int a[,];   // C3186
   int b[2][3];   // native multidimension array
   array<int,2> ^c = new array<int, 2>(2,5);   // managed multidimension array
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Advertisement