FILE *test;
student st;
int i = 0;
test = fopen("example.bin", "rb");
while (feof(test))
{
fread(&st, sizeof(st),1,test);
Class[i] = st;
i++;
}
fclose(test);
So my question is how to read it, put the data in my structure and stop the loop?