[updated]
You can use new to create a new instance of a class or allocate memory (for example, for an array), for example
Object o = new object ();
Before creating a new instance of the Object class, you cannot use it. (If you do not have static methods.) (This is just one use case, sometimes other objects will create or destroy the objects you need / don't need)
There are many good answers here, but itβs hard to explain everything about the new in one answer to SO, and if you donβt understand what happens when new is called, then itβs hard to know when to use it. This is one of the most important areas of programming, therefore, after reading the basic information here, you should study it in more detail. Here is one of the possible articles in which you can start your research:
http://en.wikipedia.org/wiki/New_%28C%2B%2B%29
Topics that you will need to study in order to understand what happens when you invoke a new one, so that you can understand when to call it (most likely this is what I can think of now): - constructors (and destructors) - static classes and methods ...
source share