Tuesday, 17 April 2012

What is the use of [] in the delete statement of the following expression:Use p = new T[n] and delete[] p; Animal* p = new Animal[80]; ..... delete[] p; | C++

In the preceding expression, [] in the delete statement is used to allocate an array using the new(also called [n] expression).

No comments: