title: Cross platform definition of 64 bit integers in C++ for Windows and Linux
body: <p>I am trying to write cross-platform code in C++ for Windows(MinGW) and Linux(g++). I was used to define 64 bit integers in Linux as "long", but when I moved to MinGW, the sizeof(long) returned 4 bytes. Then I discovered that I can use "long long" or "__INT64" to define 64 bit integers in MinGW. I have two questions:</p>
  
  <p><strong>1.-What is the most portable way to define 64 bit integers for both Windows and Linux?</strong> I am currently using #ifdef, but I don't know if this is the best way to do it:</p>
  
  <pre><code>#ifdef LINUX
      #define INT64 long 
  #elif WIN32
      #define INT64 long long
  #endif
  </code></pre>
  
  <p>2.-<strong>Should I use "long long" or "__INT64" in MinGW? and why?</strong></p>