title: Reading 64 bit Integer File
body: <p>I am trying to learn C++ by writing some code by my own and very new in this field.</p>
  
  <p>Currently, I am trying to read and write a 64 bit integer file. I write 64 bit integer file in following way:</p>
  
  <pre><code>ofstream odt;
  odt.open("example.dat");
  for (uint64_t i = 0 ; i &lt; 10000000 ; i++)
  odt &lt;&lt; i ;
  </code></pre>
  
  <p>Can anybody help me how to read that 64 bit integer file (one by one) ? So, far examples I have found, that reads line by line, not one by one integer. </p>
  
  <p>Edit:</p>
  
  <pre><code>ofstream odt;
  odt.open("example.dat");
  for (uint64_t i = 0 ; i &lt; 100 ; i++)
  odt &lt;&lt; i ;
  
  odt.flush() ;
  
  ifstream idt;
  idt.open("example.dat");
  uint64_t cur;
  while( idt &gt;&gt; cur ) {
    cout &lt;&lt; cur ;
  }
  </code></pre>