I am currently stuck on a part of my HW which is a Gradebook assignment. I need to open a file and get the student ID and 9 grades, each of which are weighted differently. I am so far able to open the file and use getline to see all the information, however I am not sure how I can save each of the variables separately.
So far this is where I am currently at.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
string sID;
ifstream fileopen;
fileopen.open("gradebook.txt");
while (fileopen) {
getline(fileopen, sID);
}
fileopen.close();
}
Create the appropriate variable type, and every time you find what you are looking for store it in one of the variables so long as you store it in the correct format