title: C++ file input stream: reading "large" integers
body: <p>I have the following code:</p>
  
  <pre><code>void readFile(BST *tree) {
      ifstream infile("input.txt");
      long int sid, t;
      string l, f, h;
      while (infile &gt;&gt; sid &gt;&gt; l &gt;&gt; f &gt;&gt; h &gt;&gt; t) {
      // The line below is for debug purposes
      cout &lt;&lt; "\"" &lt;&lt; sid &lt;&lt; "\" \"" &lt;&lt; l &lt;&lt; "\" \"" &lt;&lt; f &lt;&lt; "\" \"" &lt;&lt; h &lt;&lt; "\" \"" &lt;&lt; t &lt;&lt; "\"" &lt;&lt; endl;
          tree-&gt;insert(sid, l, f, h, t);
      }
      infile.close();
  }
  </code></pre>
  
  <p>Here is an example line:</p>
  
  <pre><code>78832112 Bruno Nicholas 32_Sugar_Rd_PA_12345 3026821712
  </code></pre>
  
  <p>Interestingly my code doesn't read anything from this line. Even more interesting is that if I remove <em>any</em> digit from the last number it reads it just fine.</p>
  
  <p>I have no idea what causes this behavior. Any ideas?</p>