The usual problem is one of running out of stack space when you make such large arrays local parameters to a function.
For example, this is generally a bad idea
Code:
int main ( ) {
int big[1000000];
}
You can make them static, which preserves scope, but does not actually place them on the stack, like so.
Code:
int main ( ) {
static int big[1000000];
}
If you don't know how many you need until the program is running, then you have to dynamically allocate them.
Code:
int main ( ) {
int howmany = 1000000; // or however you work it out.
int *big = new int[howmany];
}
No matter which way you go, you still have big[index] type access and any of them can be passed (as a pointer) to other functions without rewriting the function.