|
|
back to boardCrash (stack overflow) 9 why Posted by Sunnat 17 Apr 2012 01:53 #include<iostream> #include<math.h> using namespace std; void worc(){ double k; if(cin>>k){ worc(); printf("%.4lf\n",sqrt(k)); } } int main() { worc(); return 0; } Re: Crash (stack overflow) 9 why Your function calls itself very many times. Write #pragma comment(linker, "/STACK:10000000") And you have got 10 mbytes of memory accepted Posted by Sunnat 25 May 2012 19:19 Thank's |
|
|