title: How to read numbers on text files using turbo c++ 4.0?
body: <p>I am a beginner in programming and I am trying to make a code that reads 2 numbers from a file and then displays it in the output window on turbo c++.
  My code only reads the first number and produces incorrect output for the second number.</p>
  
  <pre><code> #include&lt;iostream.h&gt;
   #include&lt;fstream.h&gt;
   #include&lt;conio.h&gt;
  
  void main()
  {
      int x, y;
      clrscr();
      ifstream inFile;
      ofstream outFile;
      inFile.open("prac.txt");
  
      while(!inFile.eof())
      inFile &gt;&gt; x &gt;&gt; y;
      cout &lt;&lt; x &lt;&lt; " " &lt;&lt; y;
  
      inFile.close();
  
  }
  </code></pre>