|
|
back to boardTest 9 - Crash (access violation)! #include <math.h> #include <iostream> #include <iomanip> using namespace std; int main() { __int64 a; int i=0; double b[32768]; while (cin>>a) { b[i]=sqrt(double(a)); i++; } i--; for (int k=i; k>-1; k--) cout<<fixed<<setprecision(4)<<b[k]<<'\n'; return 0; } Re: Test 9 - Crash (access violation)! Increase the size of array! Re: Test 9 - Crash (access violation)! I've already tryed to increase to 100000 and got the same error... Re: Test 9 - Crash (access violation)! Posted by melkiy 14 Oct 2009 23:24 make your array global. Or use linker directive increasing stack size - the instructions are in FAQ. Re: Test 9 - Crash (access violation)! increase it to 150,000 !!! |
|
|