Path: utzoo!attcan!uunet!maverick.ksu.ksu.edu!hoss!glacier!price From: price@glacier.unl.edu (Chad Price) Newsgroups: comp.lang.c Subject: Re: Turbo C large character array Keywords: TC, char, array, large, huge Message-ID: Date: 30 Jul 90 15:40:34 GMT References: <1990Jul27.193520.4689@ux1.cso.uiuc.edu> Sender: news@hoss.unl.edu (Network News Administer) Distribution: comp Organization: University of Nebraska, Computing Resource Center Lines: 30 In <1990Jul27.193520.4689@ux1.cso.uiuc.edu> gordon@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@osiris.cso.uiuc.edu #include > gordon@cerl.cecer.army.mil #include >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@fergvax.unl.edu