dudforreal
- 116
- 0
How do you open a binary file in command in Pelles C so that it is readable?
Borek said:I would check if fopen("filename","rb") is not working.
void readFleet(Car_t toRead[])
{
FILE *fFleet;
fFleet = fopen("Fleet_File.bin", "rb");
fread(toRead, 10*sizeof(Car_t), 1, fFleet);
fclose(fFleet);
}
dudforreal said:How do you open a binary file in command in Pelles C so that it is readable?
printf("1. Add a car to the fleet.\n");
printf("2. Delete last car from the fleet.\n");
printf("3. Display full fleet on the screen.\n");
printf("4. Save the fleet to a file.\n");
printf("5. Read the fleet from a file.\n");
printf("0. Exit the program\n");
printf("\nPlease enter your choice:\n\n");