I know you guys probably think I am completely dumb in the field of c++ but I need more help .
I now need to ADD to the array a name, id and score. I thought I had a brilliant idea as a way to do this but it isn't working. Here is my code:
Code:
void addIt (ifstream& inFile, studentType studentList[], int& counter, string& name,
int& id, int& score2)
{
cout << "\nPlease enter a name: ";
cin >> name;
cout << "\nPlease enter an ID: ";
cin >> id;
cout << "\nPlease enter a score: ";
cin >> score2;
studentList[counter + 1].Name = name;
studentList[counter + 1].ID = id;
studentList[counter + 1].score = score2;
}