QUOTE(#include<wmx010> @ 21 Jan, 2008 - 03:48 AM)

QUOTE(PennyBoki @ 20 Jan, 2008 - 08:06 PM)

What is the purpose of this post?
Is it answering a question?
If so, then it is nice of you to help and contribute, but I suggest you write a tutorial on some subject or a snippet. I don't think anyone would look for an answer in a thread with no replies.
Actually i posted this in the C++ TUTORIALS section. The MODS must have confused it with a Question and moved it over the Help section.
You could do with expanding on your answer - in particular, you might explain the difference between the behaviour of these two instructions, to make it clear exactly why delete[] is required for an array. Specifically, you might explain how
delete only deallocates a single element. delete and delete[] also call a destructor for non-POD types, which is an added sting for arrays of types with a non-trivial destructor - since these objects will be left intact in memory, the behaviour that a program may expect from the destruction of these objects will never happen.