I am trying to get my program to read a file and use the file as input information. I put the file in the same directory as my program, but still nothing.
Here is my code:
int main()
{
ifstream inFile;
inFile.open("inData.txt");
if (inFile.fail())
{
cout << "file did not open please check it\n";
system("pause");
system("exit");
}
studentType sList[20];
getData(inFile, sList, 20);
calculateGrade(sList, 20);
printResult(sList, 20);
inFile.close();
system("pause");
return 0;
}