Can anyone tell me why this snippet of code just starts reading from the second element of the file?
And how could I do to read all the records in the file?
Code that I'm trying to use to read a txt file
fread(vPtrContato, sizeof(contato_ref), 1, arquivo);
printf("Nome: %s\n", contato_ref.primeiroNome);
printf("Sobrenome: %s\n", contato_ref.segundoNome);
printf("Telefone: %s\n", contato_ref.numeroTelefone);
printf("E-mail: %s\n", contato_ref.email);
fclose(arquivo);