E2022 Array size too large (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

The declared array is larger than 64K and the 'huge' keyword was not used.

If you need an array of this size, either use the 'huge' modifier, like this:

int huge array[70000L];  /* Allocate 140000 bytes */

or dynamically allocate it with farmalloc( ) or farcalloc( ), like this:

int huge *array = (int huge *) farmalloc (sizeof (int) * 70000); ?? Allocate 140,000 bytes