Export (0) Print
Expand All
Expand Minimize

Compiler Error C3261

Error Message

a function returning a managed array must have array brackets at the end of the declaration: 'declaration'

A method returning a managed array was not declared correctly.

C3261 is only reachable using /clr:oldSyntax.

The following sample generates C3261:

// C3261.cpp
// compile with: /clr:oldSyntax /LD
#using <mscorlib.dll>
using namespace System;

Int32[] f()   // C3261
// try the following line instead
// Int32 f()[]
   return 0;

Community Additions

© 2015 Microsoft