Link to home
Start Free TrialLog in
Avatar of Jerryleo
Jerryleo

asked on

How do I create an array of greater than 64k under Turbo C 2.0?

I use Turbo C 2.0 and Dos 6.22

I found this on http://community.borland.com/.

>Allocating more than 64K of data in a single modul - by Borland Developer Support Staff

> Technical Notes Database

>TN2890C.txt   Allocating more than 64K of data in a single modul
>Category   :C
>Platform   :All
>Product    :TC  1.0

>Description:
>QUESTION:
>Can I statically allocate more than 64K of data in a single module?
>ANSWER:
>Yes. Far data items are now supported:
>...
>char far array1[60000L];
>char far array2[60000L];
>...
>For arrays larger than 64k use:
>char huge array3[100000L];

>Reference:

>7/2/98 10:43:08 AM

>Products:
>Turbo C/C++ 1.0

>Platforms:
>DOS 1.0; Windows 3.1 1.0

>Article ID: 17890   Publish Date: July 02, 1998  Last >Modified: September 01, 1999


But I always get two compiling errors,

"Conflicting type modifiers"
"Array Size too large"

How do I create an array of greater than 64k under Turbo C 2.0?

Thanks a lot!

BTW, I also found this in http://community.borland.com/article/0,1410,18117,00.html

>Q. How do I create an array of greater than 64k?
>A. See TI1563.ZIP in library 2

It's only a index. I can't find the file TI1563.ZIP. Could anyone can email a copy to me.
Avatar of laax
laax

You can get the .zip file in the follwing URL
http://www.tietovayla.fi/BORLAND/CPLUS/c_tech.htm
Avatar of Jerryleo

ASKER

Allocating data >64k using the keyword huge

ftp://ftp.borland.com/pub/techinfo/techdocs/language/cpp/bcpp/ti/ti1563.zip

I am sorry. It's a broken URL.

RETR /pub/techinfo/techdocs/language/cpp/bcpp/ti/ti1563.zip
Wed Jul 03 16:32:31 2002 550 No such file.
Wed Jul 03 16:32:31 2002 RETR pub/techinfo/techdocs/language/cpp/bcpp/ti/ti1563.zip
Wed Jul 03 16:32:31 2002 550 No such file.
Is there anyone can give me a example about allocating data >64k using the keyword huge under Turbo C 2.0?

Thanks a lot!
I don't have the environemnt i.e Dos and Turbo C 2.0
...Please try "huge char" ...instead of "char huge"...
Type modifiers comes first, data type next...for ex.
'unsigned' long
'long' int
etc.
Thanks for reply.

I have put the type modifiers comes first, like huge char, but I get a "Declaretion syntax error".
ASKER CERTIFIED SOLUTION
Avatar of laax
laax

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial