编译器错误 C2090

函数返回数组

函数不能返回数组, 而是返回指向数组的指针。

下面的示例生成 C2090:

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

可能的解决方法:

// C2090b.cpp
// compile with: /c
int* func2(int * i) {
   return i;
}