johnfdutcher
Programmer
It looked easy in the book..
I read from a disk file into a structure:
structure rec_format {
char recnbr[3];
char regnbr[4];
char lname[15];
} rec;
fread(&rec, 1, 22, dsys); <---- dsys is an open fl ptr
then try to reference one variable in rec....
printf("The registration number is: %s",rec.regnbr);
The result prints the entire structure...not just the regnbr ??
I read from a disk file into a structure:
structure rec_format {
char recnbr[3];
char regnbr[4];
char lname[15];
} rec;
fread(&rec, 1, 22, dsys); <---- dsys is an open fl ptr
then try to reference one variable in rec....
printf("The registration number is: %s",rec.regnbr);
The result prints the entire structure...not just the regnbr ??