Quote Originally Posted by KBriggs View Post
I guess I should have been more specific - I am interested in arrays of basic types: for example

is

Code:
array = new int[10]
functionally the same as

Code:
array = (int *) malloc(10 * sizeof(int))
?
As Laserlight points out, new and malloc behaves differently when there isn't enough memory to satisfy the request. However, the other part of the question is sort of "what should I use", which I would say is:
1. If you are writing C, you haven't got a choice: malloc/free it is.
2. If you are writing C++, use new/delete - it will should never be wrong to do this, and if for some reason you change your mind, and decide to change the array of integers into a class CInteger, you do not need to make as many changes.

--
Mats