title: How to Convert Binary from a TXT file in C /txt including only int/
body: <p>The part of my code that I'm asking about looks like this.
  My TXT is containing number from 1-20 divided by . I want to make a BINARY file
  from this txt, that's what the program supposed to do, but it is only feeling it up with memory dirt. Can you tell me if my code has mistakes.</p>
  
  <pre><code>void txt_to_bin (void)                                 
  {
  FILE *ft,*fb;
  int a;
  ft = fopen("binadatok.txt","rt");
  fb = fopen("versenyazonosito.dat","wb");
  while (fscanf(ft,"%d\n",&amp;a) != EOF)
  {
      fprintf(fb,"%d\n");
  
  }
  
  }
  </code></pre>