Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <string.h>
- typedef struct
- {
- int canal;
- char string[35];
- float rating;
- } srat;
- int main()
- {
- FILE *f = fopen("rating.dat", "rb");
- srat in;
- while(!feof(f))
- {
- fread(&in, sizeof(srat), 1, f);
- printf("%i %s %f\n", in.canal, in.string, in.rating);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement