Need some baby steps to understand this structure bussiness. Here is my beginnings of code. I cant even make it past the compiler. My first struct statement says "missing code tag". whats wrong with the statement. I am working exactly the code as it is stated in the book and adding too , as instructed in the excercise. The statement struct is exactly like that in the book. So this is why i am confused to why i am getting a compile error.

The end game goal is to use the partial program in the book and build onto it making it calculate each students average.

thanks in advance for your help.

Code:
#include "class_info.h"
#include <stdio.h>

int main(void)
{
   struct student           class[CLASS_SIZE];


    class[0].grade = 'A';
    class[0].last_name = "Walker";
    class[0].student_id = 590017;

    class[1].grade = 'B';
    class[1].last_name = "Smith";
    class[1].student_id = 590118;

    class[2].grade = 'C';
    class[2].last_name = "jones";
    class[2].student_id = 590219;

    class[3].grade = 'A';
    class[3].last_name = "Bubba";
    class[3].student_id = 590320;

    class[4].grade = 'B';
    class[4].last_name = "johns";
    class[4].student_id = 590421;

    class[5].grade = 'C';
    class[5].last_name = "Walker";
    class[5].student_id = 590017;

    class[6].grade = 'D';
    class[6].last_name = "Smith";
    class[6].student_id = 590118;

    class[7].grade = 'B';
    class[7].last_name = "jones";
    class[7].student_id = 590219;

    class[8].grade = 'A';
    class[8].last_name = "Bubba";
    class[8].student_id = 590320;

    class[9].grade = 'C';
    class[9].last_name = "johns";
    class[9].student_id = 590421;

    average(class);
    return 0;
}


void average(struct student class[])
{
    double sum=0.0,avg;
    int i;
    int length = sizeof(class)/sizeof(student);

    for( i=0;i<length;++i )
    {
        if( class[i].grade == 'A' );
        sum+=4;
        if( class[i].grade == 'B' );
        sum+=3;
        if( class[i].grade == 'C' );
        sum+=2;
        if( class[i].grade == 'D' );
        sum+=1;
        if( class[i].grade == 'F' );
        sum+=0;

    }
    avg = (sum/length);
    printf("The average for the class is %f.\n", avg);
}

here is my
class_info.h file
Code:
#include <stdio.h>


#define CLASS_SIZE  100

struct student{
	char	*last_name;
	int		student_id;
	char	grade;
};