title: Allocating an Array greater than 2GB in C (or C++)
body: <p>I am running Windows 10 64 bit. My compiler is Visual Studio 2015.</p>
  
  <p>What I want is:</p>
  
  <pre><code>unsigned char prime[UINT_MAX];
  </code></pre>
  
  <p>(and larger arrays).
  That example gives compiler error C2148 because the application is a "Win32 console application". Likewise I can't use <strong>new</strong> to create the array; same problem. I am building it as an "x64 Release", but I guess the WIN32 console part is winning!</p>
  
  <p>I want to unleash the power of my 64 bit operating system and break free of this tiresome INT_MAX limitation on array indexes, ie proper 64 bit operation. My application is a simple C/C++ thing which neither needs nor wants anything other than a command line interface.</p>
  
  <p>I did install the (free) Visual Studio 2017 application, but it didn't give me the simple console apps that I like (so I uninstalled it).</p>
  
  <p>Is there some other application type I can build in Visual Studio that gives access to more that 4GB of memory? Is there some other (free) compiler I can use to get full 64bit access under Windows?</p>