// test if file is read
if (!myfile)
{
//display something if file not read
cerr << "File not Read"<< endl; // !Working
exit( 1 );
}
for (int i = 0; i < 20; ++i)
{
for (int j = 0; j < 20; ++j){
myfile >> array[i][j];
}
cout << endl;
}
myfile.close();
}
but this is not working for some reason... its not loading my array
Well I told you what was wrong with the code that you posted. If you want to know what's wrong with the code that is causing a problem then you need to post that instead. ;o)