#include #include #include /* one can define 'global' data types, variables, and constants here */ #define MAX_STRLEN 80 // maximum length of an unknown string #define WRD_LENGTH 32 // per word #define MAX_COURSE 5 // number of courses per student #define FALSE 0 #define TRUE 1 /* the following is a C structure to hold course information */ struct course_info { char course[WRD_LENGTH];// in the form of 'CSCI 315', 8 chars, plus '\0' char * title; // variable length string char * prof; // professor name, variable length char time[WRD_LENGTH];// in the form of 'MWF 08:00-09:00', 16 chars, plus '\0' char * room; // classroom, variable length float credit; // 1.0, 0.5, 0.25, etc. int enrollment; // number of students allowed in class struct course_info * next; // link to next node }; /* The following is a structure for list */ struct list { struct course_info * head; struct course_info * tail; }; /* function prototypes */ struct course_info * make_node(); int isEmpty(struct list * ); void insert(struct course_info *, struct list **);