The best way to read in structures is with fread(), here's some sample code:
Code:
struct RECORD{
....
}I_R_RECORD;
....
while(fread((void *)I_R_RECORD, sizeof(struct RECORD), 1, fp)==1)
printf("%c\n%s\n%s\n%d",I_R_RECORD.rec_type, I_R_RECORD.cust_code, I_R_RECORD.part_num, I_R_RECORD.quantity);
And you'd have to use 2 other while loops to read the rest of your structires.
Basically, the function fread() takes a void pointer to the struct you want to put the info into, the size of the structure, the number to read in, and the file pointer