> Im using an recursiv c++ function in my VI.
> After severall calls the VI crashes, printing an
> stack overflow error.
> I already increased in Visual Studio 6.0 the Link
> setting: allocate stack. But nothing changed.
> I need help fix this problem!!
>
> My prg. looks like this:
>
> recursiv (....) {
> int array[..][..][..];
> ....
> recursiv (..);
> }
If you are truly allocating a three D array of ints
on the stack, then it makes sense that you will run
out of stack space sooner or later. I can't help
you with increasing the stack size, but if you move
your array into a memory block and store the pointer
on the stack, then you will use less stack space and
avoid the problem.
In otherwords:
recursive() {
int *array;
array= DSNewPtr()
;
array[][][]= ...
recursive();
DSDisposePtr();
}
Greg McKaskle