I need to make a matrix of 450 x 600 of my class object. When I try to make it I get a stackoverflow exception. I tried making a 450 x 600 matrix of ints and it does the same thing. How can I overcome this limitation?

Printable View

- 03-06-2003CornpopsVisual C++ .NET Matrix Size Limitation?
I need to make a matrix of 450 x 600 of my class object. When I try to make it I get a stackoverflow exception. I tried making a 450 x 600 matrix of ints and it does the same thing. How can I overcome this limitation?

- 03-06-2003Codeplug
Use the heap and not the stack.

Code:`int n; //using the stack`

int *n = new int(); //using the heap

delete n;

Code:`int n[100]; //using the stack`

int *n = new int[100]; //using the heap

delete[] n;