How do you read data using binary file?
my binary file have data soemthing like these:
struct eat
{
char food[10];
int id;
union category food_c;
}
union category
{
char color[10];
struct location food_l;
}
struct location
{
char city[3];
char state[4];
char country[2];
}
I need to read the information from a binary file using these struct to gather the data, can anyone give me an example?