Hi people,

I am writing a code to do some matrix manipulation stuff.
like replication of a matrix in a bigger matrix vertically and horizontally, or putting some elements on a specific diagonal.

The problem is that when the size of 2-D array goes to 290, the program crashes. The code is compiled but when I try to run it...ooops!
It says:

Unhandled exception at 0x63340a97 in FirstRun.exe: 0xC00000FD: Stack overflow.

I am using Visual C++ 2008 Express edition (which is a free compiler).

This is the declaration in my code:

const int G=290;
const int L=3;
float ReplicatedMat[G+1][L];

Is this problem because of the size of the array?
Program works correctly when G=280...
What do you suggest me to do?!

Votes + Comments
Wow!! CODE Tags on the first post -- Thank you!!
8 Years
Discussion Span
Last Post by k1_zav

But the codes works properly when G=280 and l=3...

Since you are unwilling to post any code, I guess that you have this

const int G=290;
const int L=3;
float ReplicatedMat[G+1][L];

inside a recursive function eventually causing the stack overflow.

Perhaps run the program in the debugger and at the point of the stack overflow, view the Call Stack. That might tell you something useful.

Edited by mitrmkar: n/a


The code is a little big and it's hard to post a little of it on here...
I will do the checking and come back...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.