The data is written correctly to the external file. In the correct order and format. But when read back in, the format is changed, and the data is not displayed correctly. Is their something wrong with this code? It should be in this order-
MemberNumber MemberName MemberAddress MemberVisits.
fscanf (memberRead, "\n%s", MemberData[counter1].membernumber);
fgets(&MemberData[counter1].membername, 30, memberRead);
fgets(&MemberData[counter1].memberaddress, 100, memberRead);
fscanf (memberRead, "%d", &MemberData[counter1].membervisits);
m = counter1;