Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 830 Bytes

compiler-warning-level-4-c4208.md

File metadata and controls

27 lines (23 loc) · 830 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4208
Compiler Warning (level 4) C4208
11/04/2016
C4208
C4208
5cb0a36e-3fb5-422f-a5f9-e40b70776c27

Compiler Warning (level 4) C4208

nonstandard extension used : delete [exp] - exp evaluated but ignored

With Microsoft extensions (/Ze), you can delete an array using a value within brackets with the delete operator. The value is ignored.

// C4208.cpp
// compile with: /W4
int main()
{
   int * MyArray = new int[18];
   delete [18] MyArray;      // C4208
   MyArray = new int[18];
   delete [] MyArray;        // ok
}

Such values are invalid under ANSI compatibility (/Za).