I have a very large array which must be 262144 elements in length (and potentially much larger in future). I have tried allocating the array on the stack like so:
As the number is not necessarily known at compile time, the type is a pointer:
int *myArray = new int[262144];