Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Nicolas Ricci
Wed, 27 Jan 1993 10:20
Array deletion with ObjC++
Author: Nicolas Ricci
Date: Wed, 27 Jan 1993 10:20
Date: Wed, 27 Jan 1993 10:20
35 lines
1176 bytes
1176 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads