Unhandled exception at 0x771515ee Microsoft C++ exception: std::bad_alloc at memory location 0x0049f904
<p>I need to allocate a very large array is there a way to allocate an array without this types of errors? note that I have 8 GB of memory without using vector
this is exactly the error</p>

<pre><code>Unhandled exception at 0x771515ee in __ Microsoft C++ exception:
 std::bad_alloc at memory location 0x0049f904.. 
</code></pre>

<p>and this is a chunk of my code</p>

<pre><code>#include&lt;cstdlib&gt;
int main()
{
  size_t arraySize =1024*1024*1024;
  int *a= new int[arraySize];
  for (int i = 0; i &lt; arraySize; i++)
  {
    a[i] = 3;
  } 
  return 0; 
}
</code></pre>

<p>/* Thanks guys the solution for my problem is to create a new solution platform with x64 bit operation*/</p>
