I wrote the following piece of code to allocate memory for an array:
try { int n = 0; cin >> n; double *temp = new double[n]; ... } cat
On a 32-bit system, your virtual memory address space cannot exceed 2^31-1 (4294967295) bytes.
You are attempting to allocate 536000000*sizeof(double) bytes, which is obviously more than that.
536000000*sizeof(double)