i am writing a code to create a 2600 * 1000 array after reading a .txt document that is filled with random letters (2.4 mb of random letters). When i try to run the program it just halts and none of my check points show up (cout << "a";). here is my code:
Code:
string key="C:\\key.txt";
ifstream inFile;
int i=0;
int j=0;
const int ROW = 2600;
const int COL = 1000;
char keyarray[ROW][COL];
char ch;
cout << "ab";
inFile.open(key.c_str());
if (inFile.fail())
{
cout << "not properly opened";
exit(1);
}
cout << "bc";
for (j=0; j<=ROW; j++)
{
cout << "a";
for (i=0; i <= COL; i++)
{
cout << "c";
inFile.get(ch);
keyarray[j][i]=ch;
cout << keyarray[j][i];
cout << "d";
}
}
Comment