ive got this

Code:
struct student
{
int mark[MAX];
long id[MAX];
};
which is also part of
Code:
class subject
{
private:
char code[MAX];
int students[MAX];
student data;

public:
void ReadFile();
void DisplayMenu();
};
how do i read from a file and store it into an array....

Code:
inFile>>code;
cout<< "Subject Code" << code;

inFile>>students;
 cout << "\tNumber of Students" << students <<endl;


for(int i=0;i<students;i++)
{
inFile>>id;
cout << "Student Number" <<id;
inFile>>smark;
cout << "\tMark" << mark <<endl;
this doesnt work..
can anybody help me..
thankyou...