I\'m new to C++, trying to learn by myself (I\'ve got Java background).
There\'s this concept of dynamic memory allocation that I can assign to an array (for example
For static allocation, you must specify the size as a constant:
MyObj arrObject[5];
For dynamic allocation, that can be varied at run-time:
MyObj *arrObject = new MyObj[n];
The different between new and malloc is that new will call the ctor for all those objects in the array, while malloc just gives you raw memory.