I am trying to display the vector as well as get an exam average and a class average . The following is as close as I have got. Sorry I am new to C++. The following are the error
1. Vectors.cpp no match for 'operator<<' in 'std::cout << (&iter)->__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator* [with _Iterator = Student*, _Container = std::vector<Student, std::allocator<Student> >]()'
for (int i = 0; i < numStudents; i++){
Student student;
cout << "Enter the first name for student #" << i+1
<< ": " << endl;
cin >> student.fName;
sNames.push_back(student);
cout << "the first name of the student is: " << student.fName << endl;
cout << "Enter the last name for student #" << i+1
<< ": " << endl;
cin >> student.lName;
sNames.push_back(student);
cout << "the first name of the student is: " << student.fName << endl;
for (int j = 0; j < NUM_EXAMS ; j++ ){
cout << "Enter the exam scores student #" << i+1 << " exam #" << j + 1
<< ": " << endl;;
cin >> tempExam;
student.exams.push_back(tempExam);
}// end of nested for loop
}//end of for loop
//display the vector
for (iter = sNames.begin(); iter != sNames.end(); iter++){
cout << *iter << " ";
cout << endl;
}// end of for loop
for (int i = 0; i < sNames.size(); i++){
cout << sNames.size() << " " ;
cout << endl;
}// end of the for loop