Do not use windows specific lib/headers Suppose we have a class class Person { p
ID: 3658528 • Letter: D
Question
Do not use windows specific lib/headers
Suppose we have a class
class Person {
public:
int id;
vector<float> scores;
float averageScore;
};
And we also have a vector of type person.
Vector<Person>v;
In this vector we are going to store details of persons, the details will be read from a file.
The file contains a space separated list of numbers. Each person takes 4 subjects so there will be a total of 4*n numbers in the file. Read all the numbers from the file and maintain a count of the numbers read. (your main FUNCTION should accept the name of the files as input).
Divide the count by 4. That will give you the number of students whose data is being read in.
Set up the vector