Compiler Error C3616
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C3616

Error Message

'number' : a size cannot be specified in a __gc array declaration

A __gc array was incorrectly declared. Subscript values are allowed on the right side of the expression but not on the left.

C3616 is only reachable using /clr:oldSyntax.

The following sample generates C3616 and shows one way to resolve the error:

// C3616.cpp
// compile with: /clr:oldSyntax
#using <mscorlib.dll>
int main()
   int a  __gc[2] = new int __gc [];   // C3616
   int b __gc [] = new int __gc [12];   // ok
© 2015 Microsoft