Compiler Error C2109
subscript requires array or pointer type
The subscript was used on a variable that was not an array.
The following sample generates C2109:
// C2109.cpp
int main() {
int a, b[10] = {0};
a[0] = 1; // C2109
b[0] = 1; // 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