Turbo C large character array

Chad Price price at glacier.unl.edu
Tue Jul 31 01:40:34 AEST 1990


In <1990Jul27.193520.4689 at ux1.cso.uiuc.edu> gordon at osiris.cso.uiuc.edu (John Gordon) writes:


>	Hello.  I am having a problem, and I hope someone can help me.

>	I am trying to declare a char array that is rather large, and TCC
>won't accept it, it says it is too large to fit within available memory.
>Bull!  I know for a fact that there is at least 300 or 400K left.  Anyway,
>here is the declaration:

>		char menu[1200][80];

>	By my calculations, this shoud be equal to 96K worth.  I am using
>the Huge model, which specifically says that arrays of more than 64K may be
>used.

>	Any help will be most appreciated.


>---
>John Gordon
>Internet: gordon at osiris.cso.uiuc.edu        #include <disclaimer.h>
>          gordon at cerl.cecer.army.mil       #include <clever_saying.h>
>GEnie:    j.gordon14                  

I'm afraid you have to use malloc (calloc), rather than simply declare
the large array. Then it works fine.

Chad Price
price at fergvax.unl.edu



More information about the Comp.lang.c mailing list