title: Read from file negative numbers C++
body: <p>I have to get numbers from file and some of them are negative. So, how can I do that? (C++)</p>
  
  <p>Now I'm trying just this (without something special):</p>
  
  <p><strong>U1.txt file:</strong></p>
  
  <pre><code>4 5 -1 6 -2
  </code></pre>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>ifstream fd(FD);
  int n1,n2,n3,n4,n5;
  fd&gt;&gt;n1&gt;&gt;n2&gt;&gt;n3&gt;&gt;n4&gt;&gt;n5;
  </code></pre>