i have a simple C question with file struct
if i create a simple struct
struct person_info
{
char firstname[10];
char lastname[10];
int age;
}
if i have a binary file with this exact structure and i want to put the info onthe file into this struct how would i do so?
i know i have to create a file pointer
FILE *filname
filename=fopen("personInfoFile","r"
i would open the file for reading and then what? help...
thx
if i create a simple struct
struct person_info
{
char firstname[10];
char lastname[10];
int age;
}
if i have a binary file with this exact structure and i want to put the info onthe file into this struct how would i do so?
i know i have to create a file pointer
FILE *filname
filename=fopen("personInfoFile","r"
i would open the file for reading and then what? help...
thx