Im trying to write a nested for loop that gets the data from an input file. The for loop will check the student and the 3 courses they are taking the 5 test from each course. The outer loop will be on students, the middle loop will be on courses and the inner loop will be on four tests.
Im stuck and I don't know how to write the for loop
To cut it short:
- you should decide what you want to do with your data while you read them (I think you want to save them into a container, but that's not the only option);
- do you know about structs?
- to manage a name|space|surname combination, you need either two std::strings or std::getline();
- every loop in your code should read some data:
outer loop
name surname
address
...
inner loop
course id
inner-inner loop
mark
BTW, are you sure about those data? At first sight, they look untidy.