Compiler Error C2466
cannot allocate an array of constant size 0
An array is allocated or declared with size zero. The constant expression for the array size must be an integer greater than zero. An array declaration with a zero subscript is legal only for a class, structure, or union member and only with Microsoft extensions (/Ze).
The following sample generates C2466:
// C2466.cpp
// compile with: /c
int i[0]; // C2466
int j[1]; // OK
char *p;
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for