The easy way to do this is by using std::vector
std::vector data;
data.reserve(<Number of Elements);
or potentially std::deque (depending on your usage).
Will the compiler put it on the stack (possibly causing a stack overflow), or will it be smart enough to put it on the heap?
A stack overflow is when the theoretical stack and theoretical heap collide and intermingle. If the stack was going to overfow then the heap is also going to fail.
Some systems have a maximum size of stackframe (this is compiler and platform specific) see your compiler documentation for details. As a result it is usually better to allocate huge structures dynamically (though not directly).
std::vector does this (probably). It has a small local object presence but the main payload (usually) is implemented as a dynamic heap allocation.