Hi, somebody please help me solve this, I get an error when compiler looks at while statement. (I've created the file and it is in the same directory, so it is reachable)I looked up online and did't find any solution either.
main.cpp:54: error: no match for 'operator>>' in 'rData >> S[n].main()::Student::name'
int main()
{
int i = 0;
string line;
int meanGPA = 0;
int meanAge = 0;
int sum;
////////////////////////CREATE TWO STRUCTURES/////////////////////////////////
struct Date
{ int month;
int day;
int year;
} ;
struct Student
{ string name;
Date dob;
double GPA;
}S[200];
////////////////////////READ FROM THE FILE ////////////////////////////////////
ofstream rData;
rData.open ("student.txt", ios::out);