title: C: Difference between U64 and uint64_t
body: <p>I am trying to learn C after working with Java for a couple of years.
  I've found some code that I wanted to reproduce which looked something like this:</p>
  
  <pre><code>U64 attack_table[...]; // ~840 KiB 
  
  struct SMagic {
     U64* ptr;  // pointer to attack_table for each particular square
     U64 mask;  // to mask relevant squares of both lines (no outer squares)
     U64 magic; // magic 64-bit factor
     int shift; // shift right
  };
  
  SMagic mBishopTbl[64];
  SMagic mRookTbl[64];
  
  U64 bishopAttacks(U64 occ, enumSquare sq) {
     U64* aptr = mBishopTbl[sq].ptr;
     occ      &amp;= mBishopTbl[sq].mask;
     occ      *= mBishopTbl[sq].magic;
     occ     &gt;&gt;= mBishopTbl[sq].shift;
     return aptr[occ]; 
  }
  
  U64 rookAttacks(U64 occ, enumSquare sq) {
     U64* aptr = mRookTbl[sq].ptr;
     occ      &amp;= mRookTbl[sq].mask;
     occ      *= mRookTbl[sq].magic;
     occ     &gt;&gt;= mRookTbl[sq].shift;
     return aptr[occ];
  }
  </code></pre>
  
  <p>The code is not that important but I already failed at using the same datatype: <code>U64</code>, I only found <code>uint64_t</code>. Now I would like to know where the difference in <code>U64</code>, <code>uint64_t</code> and <code>long</code> is.</p>
  
  <p>I am very happy if someone could briefly explain this one to me, including the advantage of each of them.</p>
  
  <p>Greetings,
  Finn</p>