Hi all,

I have a problem with some read/write functions.
I have a .bin file which contains a lot of structures as follows:

Code:
struct alumno
{
char id[10]; 
char apellido1[32];
char apellido2[32];
char nombre[32];
float nota1p; 
float nota2p; 
float notamedia; 
char photofilename[20]; 

};
What I have to do is read the file, firstly one structure by one, and then all the file at once and change the value if notamedia is less than 3. I'm using read() and lseek(), but I'm very loss . Somebody can give me a hand in developing the code. I believe is not too big.
Thanks in advance for the help