I am trying to define an array of N = 1000000000 integers on the heap. My code is the following:
#define N 1000000000
int A[N];
But I am getting the following error when I try to compile my code:
This works for smaller numbers so why isn't it working now?
EDIT: After suggestions, I have defined A like this:
int *A = malloc(4000000000ULL);
I am now getting the error: Initializer element is not constant. It should also be noted that this is a global array.