I am new to C ++ coding in Xcode as my structure, so I would like to ask a question which, I believe, is only related to memory management
What I'm trying to achieve is that I am trying to create a matrix size of 10,000 x 10,000 , but even I am doing the correct coding (at least what I think), I just can't get it working, just indicating an error EXC_BAD_ACCESS .
You can find my code below. Is this an Xcode related error, or did I make an obvious coding error?
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
int matrix[10000][10000];
for(int i=0;i<10000;i++)
for(int j=0;j<10000;j++)
matrix[i][j]=24;
cout<<"Done"<<endl;
return 0;
}
source
share