previous | index | next

The new Operator

In our example we would use:
           new int[n]
Note that the size can be in a variable (not the case with static arrays).

The new operator returns a reference (pointer) to the first element in the array, rather than the array itself.


previous | index | next