Cluterbug,
The forum definitely needs more information to help you out. Particularly, whether or not you know how to use input/output file streams (ifstream/ofstream).
I'm not a pro, but for your particular problem, I'd recommend:
1) create a structure (or class) to handle the data for each student.
1 2 3 4 5 6 7 8 9 10 11 12
|
struct student
{
string studentName;
int minScore;
int maxScore;
int avgScore;
int scoreCount;
int numExcellent;
int numSatisfactory;
int numNormal;
int numNeedsImprove;
};
|
The benefit of using classes here is that you can add member function(s) that return the excellent, satisfactory, normal, needs improvement statistics you are looking for; as well as the calculate the avgScore and other needed information. I don't have enough time to build a class but you get the drift.
2) You'll then need to create an array of this structure (or object), to hold the information for each student. You can of course dynamically allocate this if need be.
3) Finally, you'll have to create an ifstream object and get the information needed from the file. We would need much more information about the format of your data file, but assuming it's a .txt filel, it would be something like:
1 2
|
ifstream fin("MyText.txt");
while (fin >> allStudent.studentName >> ', ' >> allStudent.minScore......);
|