Export (0) Print
Expand All
Expand Minimize
3 out of 5 rated this helpful - Rate this topic

Compiler Error C2090

Error Message

function returns array

A function cannot return an array. Return a pointer to an array instead.

The following sample generates C2090:

// C2090.cpp
int func1(void)[] {}   // C2090

Possible resolution:

// C2090b.cpp
// compile with: /c
int* func2(int * i) {
   return i;
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.