Path: utzoo!attcan!uunet!mcsun!hp4nl!sci.kun.nl!atcmpe!leo From: leo@atcmp.nl (Leo Willems) Newsgroups: comp.lang.c++ Subject: delete [] Keywords: delete class [] Message-ID: <641@atcmpe.atcmp.nl> Date: 27 Jul 90 13:16:58 GMT Organization: AT Computing, Nijmegen, The Netherlands Lines: 26 When shifting from 2.0 to 2.1 I found myself in problems with: func(){ classtype *m = new classtype[10]; delete[10] m; } In 2.0 this works fine, in 2.1 not, that compilers suggests: delete [] m; which indeed works correct. (but not in 2.0, which accepts the code but generates a .c file with a syntax error) Is delete[] indeed the correct way ? Should delete[] be accepted by 2.0 or is it new to 2.1? Thanks in advance, Leo Leo Willems Internet: leo@atcmp.nl AT Computing UUCP: mcsun!hp4nl!kunivv1!atcmpe!leo P. O. Box 1428 6501 BK Nijmegen Phone: +31-80-566880 The Netherlands Fax: +31-80-555887