Struct Arrays whats next help me plz

The next step Im supposed to be able to assign a random number of quiz scores to each student and access each student by their student number and give an average of each students quizzes.
# include <iostream.h>
# include <string.h>
using namespace std;
struct student{ int stu_num; //student number
string name; //student name
int quiz[10]; //student quizzes
double avg;};
int main(){
student student1;
student1.stu_num=1001;
student1.name="Joe Blow";
cout<<"Please enter the student number for whom you'd like to sees average of quiz scores."<<endl;
int x;
if x==student[n];
cin>> student1 <--HERES ME ALL COMPLETLY LOST!!!
cout<< student[n].avg;
return 0;}
Last edited on
Topic archived. No new replies allowed.