I need help reading a bool function from my HW assignment, I am not asking you to do complete my assignment for me. All I need help with is reading my bool function in main. Thank you for looking
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
struct StudentType
{string studentName;
int testScore;//Between 0 and 100
char grade;
};
void PrintNameHeader(ostream& out);
bool OpenInputFile(ifstream& inFile, string& infilename );
void Pause();
void ReadStudentData(ifstream& infile, StudentType student[], int& );
void AssignGrades(StudentType student[], int);
int HighestScore(const StudentType student[], int );
void PrintNamesWithHighestScore(const StudentType student[], int);
void DisplayAllStudents(const StudentType student[], int);
void GetLowHighRangeValues(int& , int&);
void DisplayStudentsInRange(const StudentType student[], int, int, int);
void SortStudentsByName(StudentType student[], int);
void SortStudentsByScore(StudentType student[], int);
int main()
{
const int NUM_NAMES=20;
ifstream infile;
string inFilename;
PrintNameHeader(cout);
bool OpenInputFile(ifstream& inFile, string& infilename);
return 0;
}
//Function definitions
void PrintNameHeader(ostream& out)
{
//Display name header on screen
cout << "**************************************************" << endl;
}
bool OpenInputFile(ifstream& inFile, string& infilename)
{
cout << "Enter the name of the file that you want to open for input.\n";
cout << "Do not put spaces in the file name";
cin >> infilename;
cout << endl;
inFile.open(infilename.c_str());
if (inFile.fail())
{
cout << "Sorry, the input file " << infilename <<" was not found"<< endl;\
return false;
}
cout << "Input file '" << infilename << " is open for reading.\n\n";
return true;
}
void Pause()
{
cout << endl;
cin.ignore(80, '\n');
cout<<"Please hit the enter key to continue...\n";
cin.get();
}
void ReadStudentData(ifstream& infile, StudentType student[], int& numstudents)
{
}
void AssignGrades(StudentType student[], int numstudents)
{
}
int HighestScore(const StudentType student[], int numstudents)
{
int Students = 6;////dummy
return Students;
}
void PrintNamesWithHighestScore(const StudentType student[], int numstudents)
{
}
void DisplayAllStudents(const StudentType student[], int numstudents)
{
}
void GetLowHighRangeValues(int& lowRange, int& highRange)
{
}
void DisplayStudentsInRange(const StudentType student[], int numStudents, int lownum, int highNum)
{
}
void SortStudentsByName(StudentType student[], int numStudents)
{
}
void SortStudentsByScore(StudentType student[], int numstudents)
{
}