title: How to use fread() to read 2 integers in a line?
body: <p>I need to read 2 integers in a line and somehow store them to compute the distance between two coordinates.</p>
  
  <p>These codes will be provided in binary.</p>
  
  <pre><code>3
  122 188
  222 288
  322 388
  </code></pre>
  
  <p>3 is the number of coordinates there is in a file. </p>
  
  <p>(122) is x coor and (188) is y coor.</p>
  
  <p>So far from what I'm getting</p>
  
  <pre><code>FILE* fp = fopen(argv[1], "rb");
  
  int points;
  long numbytesread=0;
  
  numbytesread= fread(&amp;points, sizeof(int), 1, fp);
  </code></pre>