title: fread only reading in from the first time I ran the program
body: <p>When I first run I would add 3 records, which gives me a count of 3. Then I <code>fwrite</code> the count into a bin file, and the records into a bin file, then I close the program.</p>
  
  <p>When I reopen it and then I <code>fread</code> in and it will give me my 3 records and a count of 3. But from there on, no matter if I back up or when I read in, it will give me the same count 3 and 3 records, though since the count isn't being updated either this may be why <code>fread</code> is only reading in the first time records.</p>
  
  <p>I am not sure why the counter isn't updating. Both <code>fread</code> and <code>fwrite</code> are returning = success so I am not sure what`s up.</p>
  
  <pre><code>void backUp(PAYROLL employee[], long int *pCounter)
  {
      FILE *counter;
          errno_t result1 = fopen_s(&amp;counter, "c:\\myFiles\\counter.bin", "a+b");
          if (result1 == 0){
              fwrite(pCounter, sizeof(long int), 1, counter);
              fclose(counter);
          }
          else
              printf("Back up of counter failed! error:%d",result1);
  
      FILE *record;
  
          errno_t result2 = fopen_s(&amp;record, "c:\\myFiles\\record.bin", "a+b");
          if (result2 == 0){
              fwrite(employee, *pCounter *sizeof(PAYROLL), 1, record);
              fclose(record);
          }
  
          else
              printf("Back up of record failed! error:%d", result2);
  }
  
  void upload(PAYROLL employee[], long int *pCounter)
  {
      FILE *counter;
      errno_t result1 = fopen_s(&amp;counter, "c:\\myFiles\\counter.bin", "a+b");
      if (result1 == 0){
          result = fread(pCounter, sizeof(long int), 1, counter);
          fclose(counter);
          printf("Counter:%d", *pCounter);
      }
      else
          printf("Upload up of counter failed!");
      FILE *record;
      errno_t result2 = fopen_s(&amp;record, "c:\\myFiles\\record.bin", "r+b");
      if (result2 == 0)
      {
  
              result2 = fread(employee, *pCounter *sizeof(PAYROLL), 1, record);
              printf("Upload successful!\n");
  
          fclose(record);
      }
      else
          printf("Error opening file!");
  }
  </code></pre>