Hello eveyone, I have been tasked with writing a server side program. On "my" side I am to open a binary file and fill structs and enum. Here is what I was given as a .h file:
Code:
/*classes.h*/
typedef enum {MW, TR} days;
typedef struct {
int hour, min;
} Time;
typedef struct {
char Dept[5];
int course, sect;
days meet_days;
Time start, end;
char instr[20]
} sched_record;
Here is my problem, I have worked with structs and know how to load a "single" struct with a binary file. How would I load this struct plus the enum? I am not asking for code here. I will probably be back later on with that and the code I have written. I am trying to get the logic part down. Any help would be appreciated. Thanks!
Sorry about that, I forgot to add what is in the binary file:
Code:
Math 102 10 M 0800 0850 Schulte
Eng 033 1 T 0930 1050 Shakespeare
Art 308 2 M 0800 1150 VanGogh
Anth 055 13 T 1200 1325 Kroeber
CS 125 2 T 0800 0850 Hoare
Eng 202 10 M 1000 1050 Chaucer
Chem 100 5 T 1100 1250 Pauling
Phys 395 2 T 1200 1250 Einstein
CS 125 4 M 1030 1120 Knuth
Math 420 2 T 0800 0950 al-Khowarizmi