RAD Studio |  |

E2022: Array size too large (C++)

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:

Copy Code

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

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

Copy Code

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

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!