I keep getting error C4430: missing type specifier - int assumed. Note: C++ does not support default-int!

I have a very simple struct.
In a file called grades.h I have
1
2
3
4
5
struct grades {
string studentname;
string classname;
char lettergrade;
};


In main I have

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <fstream>
#include <string>
#include "grades.h"
using namespace std;

int main()
{
	ifstream database;
	int studentnum;
	grades studentdata[1000];

	database.open("gradedata.txt");
	studentnum = 0;
	database >> studentdata[0].studentname >> studentdata[0].classname >> studentdata[0].lettergrade;
	while (!database.eof())
	{
		studentnum = studentnum + 1;
	database >> studentdata[studentnum].studentname >> studentdata[studentnum].classname >> studentdata[studentnum].lettergrade;
	}
return 0;
}


And I keep getting these errors for every variable in my struct
error C2146: syntax error : missing ';' before identifier 'studentname'
missing type specifier - int assumed. Note: C++ does not support default-int


I'm sure theres something obvious I'm missing but I don't know what it is!
grades.h is included before using namespace std;, so std::string still hasn't been moved into the global namespace when grades::strudentname is declared.
Aha! Thank you!
Topic archived. No new replies allowed.