Compiler Error C2090
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2090.
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;
}
Show: