-1

I define arrays in this way:

double uo[n+2][m+2][n1+2] , 
       vo[n+2][m+2][n1+2] , 
       wo[n+2][m+2][n1+2] ,
       du[n+2][m+2][n1+2] , 
       dv[n+2][m+2][n1+2] ,
       dw[n+2][m+2][n1+2] ,  
       w1[n+2][m+2][n1+2] , 
       z1[n+2][m+2][n1+2] ,
       z[n+2][m+2][n1+2]  ;

Once I made it as static double then error removes but it keeps running and does not terminate.

haccks
  • 100,941
  • 24
  • 163
  • 252

1 Answers1

1

If m or n are to big, you'll get a stackoverflow because you are trying to take to much space in your stack. Dynamic allocation should be done in the heap using functions such as malloc()

Kotshi
  • 338
  • 3
  • 15