In article <e1**********@v olcano1.grnet.g r>,
Giannis Papadopoulos <ip******@inf.u th.gr> wrote:
lu**********@g mail.com wrote: is anyone know how to implement a huge 2-D array?
such as ' unsigned char a[1500][1500]; '
I compile and run it in VC 6.0, but it show me an error....
No errors here (gcc). Maybe there is an error somewhere else?
Please post the code that has problems.
The problem is probably just that it is a big array. C implementations cannot
necessarily support huge arrays; VC 6.0 has been noted a few times before
as restricting the array size.
I'm going to guess further that the OP is trying to declare that array
as an 'auto' variable (i.e., a local variable in a routine.) The array
occupies about 2 1/4 megabytes, which is larger than some implementations
allow for local variables. Declaring the variable to be 'static' might
clear up the problem for the OP, if the routine is not called recursively.
If not, then the OP will likely need to malloc() the space.
--
Okay, buzzwords only. Two syllables, tops. -- Laurie Anderson