home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!sgiblab!spool.mu.edu!uwm.edu!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!sicsun!disuns2!ricci
- From: ricci@disuns2.epfl.ch (Nicolas Ricci)
- Newsgroups: comp.sys.next.programmer
- Subject: Array deletion with ObjC++
- Message-ID: <5715@disuns1.epfl.ch>
- Date: 27 Jan 93 10:20:16 GMT
- Reply-To: ricci@disuns2.epfl.ch (Nicolas Ricci)
- Organization: Ecole Polytechnique Federale de Lausanne
- Lines: 34
-
-
- Does anybody know how to delete an array in ObjC++ (NeXTStep 3.0) ?
-
- The standard way for doing that is to use the form
- delete [] _cast_expression_
-
- for example :
-
- int* a = new int[10];
- ...
- delete [] a;
-
- When I compile this code with the ObjC++ Compiler, I get the following
- error message :
-
- parse error before ']'
-
- To solve this problem, I tried to give as parameter the size of the array
- to delete, like this :
-
- delete [10] a;
-
- In this case, I just got the warning (but NO error message !):
-
- array size expression for delete ignored
-
- With this non ANSI-C++ syntax, could I be sure that my array will be
- correctly deleted ?
-
- Thanks for help.
-
-
-
- Nicolas Ricci
- e-mail : ricci@disuns1.epfl.ch
-