However, now that there are compilers that allow the first example, what exactly are they doing? Are they still going in the data-segment, or are they not going on the heap? If they're going on the heap, then what is the difference between the examples, and why would I still have to call delete[] on the 2nd example, but not the 1st example?
The first one is declaring a static variable (usually on the stack*) that will die at the end of the code block in which it is defined.
The second one is dynamically allocating a variable (usually on the heap*) which means that you are the one that can decide where to deallocate it with delete[]
(and yes you should remember to do it).
The main difference between the two, in the array context, is that the second one can be easily resized by deallocating the memory it points (the previous array for example) and make it point to a new array still dynamically allocated.
int* arr = new int[5];
[...]
delete[] arr;
arr = new int[10];
Static arrays int hi[length]
usually declare a const int*
which shouldn't be modified instead. It is to say that C++ provides a complete set of containers that can / should be used instead of arrays.
[*] Note: The C++ standard doesn't specify where to allocate dynamic or static memory.