Highly placed sources report that S.R.Sathe wrote:
> Dear sir,
>
> I would like to use lage dimensional arrays in gcc. I am unable to
> access
> an array of dimension int a[1000][1000]. Please help
Just for grins, the program below compiled without error, but generated
a bus error when executed. Machine in question is a Pentium II 266 with 128
MB RAM. What kind of machine do you have? What version of GCC? What error(s)
do you get?
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int i[1000][1000];
int j, k;
for(j = 0; j < 1000; ++j) {
for(k = 0; k < 1000; ++k) {
i[j][k] = (j + k);
}
}
printf("i[1000][1000] = %ld\n", i[1000][1000]);
exit(0);
}
Kurt
--
Informix on Linux FAQ
http://www.xmission.com/~kwall/iolfaq/english/iolfaq.html
http://www.xmission.com/~kwall/iolfaq/spanish/iolfaq.html (Spanish)
http://www.xmission.com/~kwall/iolfaq/romanian/iolfaq.html (Romanian)