previous | index | next

The new Operator

In these cases we can create dynamic arrays at run time from the system's free store, use them for as long as we need them, then return the memory they use back to the system.

To dynamically create an array, use the new operator, like this:

           new type[size]
where type is the element type of the array and size is the number of elements.

previous | index | next