Compiler Error C2118
negative subscript
The value defining the array size is larger than the maximum array size or smaller than zero.
The following sample generates C2118:
// C2118.cpp
int main() {
int array1[-1]; // C2118
int array2[3]; // OK
}
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