Dynamic arrays VS normal arrays

When comparing multi dimentional arrays and vectors, nobody really seem to care for normal arrays. What's the advantage of an arraay being on the heap rather on the stack?
The stack is a finite resouce--you can easily run out of it, and it you do the application is terminated.

The heap is a shared resource, and you can detect if you've run out at runtime.

You should always use the stack with care.

You should always use the stack with care.

you meant the heap right?
I think he means the stack. The size of the stack is usually quite small and you don't get an exception thrown if you run out of stack space like you do when a heap allocation fails.
Last edited on
OKOK
thanks!
Also dynamically sized arrays are not possible to create on stack.
Topic archived. No new replies allowed.