What is the difference between operator new and the new operator?

This is what happens when you create a new object:
  1. the memory for the object is allocated
  2. the costructor of the class is invoked to properly initialize this memory.
The new operator does both 1 and 2. The operator new only does 1.

No comments: