Quote Originally Posted by Matticus View Post
Insert this code immediately after your "fgets()" call:

Code:
if(strcmp(buff,"\n")==0)
    printf("*** newline in buffer! ***\n");
Does this help you understand what's going on?
I think that after this part of code:
Code:
fscanf(f,"%d",&Students[i].lessons_num);
fscanf() didn't "get" the '\n' character, and the first time fgets is executed, I just read the newline char.
What, in your opinion, is the best way to write this part of code?

thanks in advance...