Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 736 Bytes

compiler-warning-level-2-c4156.md

File metadata and controls

27 lines (22 loc) · 736 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 2) C4156
Compiler Warning (level 2) C4156
11/04/2016
C4156
C4156
9adf3acb-c0fe-42a8-a4db-5822b1493f77

Compiler Warning (level 2) C4156

deletion of an array expression without using the array form of 'delete'; array form substituted

The non-array form of delete cannot delete an array. The compiler translated delete to the array form.

This warning occurs only under Microsoft extensions (/Ze).

Example

// C4156.cpp
// compile with: /W2
int main()
{
   int (*array)[ 10 ] = new int[ 5 ][ 10 ];
   delete array; // C4156, changed by compiler to "delete [] array;"
}