I want to make a bool matrix named connectionsOf
with size of up to 40 000. Here is my code:
int index = 40000;
bool connectionsOf[index][index];
However, when I run it on a file with 37 000 numbers to fill up the matrix, there is a segmentation fault. Browswing around on stackoverflow, I discovered it's because the index number is too high that it blows the stack. Is there a way to make this stack possible though? such as static, const, dynamic, pointers? and if so, what should I replace my code with?