Mail Archives: djgpp/1999/06/09/17:51:58
perryr8461 AT my-deja DOT com wrote:
>
> Hello,
> I have some problems with the following code:
>
> ...
> main()
> {
> int num_m, num_n,i,q;
> int m[128][128];
> printf ("m=");
> scanf ("%d", &num_m);
> printf ("n=");
> scanf ("%d", &num_n);
> for (i=0;i<num_m;++i)
> {
> printf ("\nm#%d\n", i+1);
> for (q=0;q<num_n;++q)
> {
> printf ("n#%d=", q+1);
> scanf ("%d", m[i][q]);
> }
> }
> }
> ...
>
> When I compile it with TurboC and replace int m[128][128] with
> int m[16][16] it runs correctly. But when I compile it with DJGPP
> it aborts. I guess it has something to do with the array m. Does
> somebody know where the bug is?
See FAQ section 15.9.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -