Compiler Error C2203
delete operator cannot specify bounds for an array
With the /Za (ANSI) option, the delete
operator can delete an entire array but not parts or specific members of the array.
The following sample generates C2203:
// C2203.cpp
// compile with: /Za
int main() {
int *ar = new int[10];
delete [4] ar; // C2203
// try the following line instead
// delete [] ar;
}
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