title: Proper use/includes for uint64_t in C++
body: <p>For reference, I am compiling in C++11.</p>
  
  <p>I am getting started on writing a chess engine using a bitmap representation of the board as a piece-centric approach. It seems like the suitable type to be using is uint64_t , however, after searching online quite a bit, i am a bit unsure about the "best practice" here.</p>
  
  <p>I am beginning to define the .hpp file for the game board.
  Firstly, I am confused about the similar behavior that different code seems to exhibit.</p>
  
  <pre><code>#include &lt;cstdint&gt;
  uint64_t board;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>#include &lt;cstdint&gt;
  std::uint64_t board;
  </code></pre>
  
  <p>both compile just fine. What is the difference between the two? Is one better than the other? </p>
  
  <p>Additionally, I've noticed that I don't even need to include cstdint to be able to use uint64_t :</p>
  
  <pre><code>#include &lt;iostream&gt;
  uint64_t board;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#include &lt;iostream&gt;
  uint64_t std::board;
  </code></pre>
  
  <p>Both compile just fine, like the 2 cstdint examples above. As such, I am quite confused as to how uint64_t is supposed to be used in C++11, and why all 4 of those examples all do the exact same thing. I was told that you want to use cstdint , but it seems like iostream provides the type def as well? Is there a specific way that is the "best/safest" (for example in terms of namespace conflict)? </p>