new and Arrays
new to allocate an array of objects by specifying the number of objects to allocate in a pair of square brackets after a type name. In this case,
new allocates the requested number of objects and (assuming the allocation succeeds) returns a pointer to the first one:
// call get_size to determine how many ints to allocateint *pia = new int[get_size()]; // pia points to the first of these ints
The size inside the brackets must have integral type but need not be a constant.
typedef int ...