cout << "Please enter the name of the file including '.txt',\n"
<< "that you wish to be used as the numbers." << endl;
cin >> filename;
ifstream inFile;
inFile.open(filename); //opening the file
for (i = 0; i < maxr; i++);
{
for (j = 0; j < maxc; j++)
{
inFile >> np[i][j];
}
}
if (inFile.fail())
{
cout<< "The file was not found" << endl;
system("pause");
exit(1);
};
inFile.close();
It's opening the file(i assume becuase it doesnt say it wasnt found), but not reading the numbers and storing them in the array correctly. it replaces all the numbers with -858993460