// Demonstrating a student struct
#include "stdafx.h"
#include <iostream>
usingnamespace std;
struct student
{
int creditHours;
double gradePointAverage;
};
int main()
{
Student oneSophomore;
cout << "Please enter a student's credit hours ";
cin >> oneSophomore.creditHours;
cout << "Please enter the student's grade point average ";
cin >> oneSophomore.gradePointAverage;
cout << "The number of credit hours is " << oneSophomore.creditHours << endl;
cout << "The grade point average is " << oneSophomore.gradePointaverage << endl;
return 0;
}
I keep getting errors about sophomore and oneSophomore. I don't understand, I declared them like the book says.