|
|
вернуться в форумC++ Crash (stack overflow) #include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { long double array[128*1024]; long double x = 0; int k = 0; while ( cin >> x ) { array[k] = sqrt(x); ++k; } for ( int i = k-1; i >= 0; --i ) cout << fixed << setprecision(4) << array[i] << endl; return 0; } Re: C++ Crash (stack overflow) Послано hatred 21 июл 2011 01:52 try to define array in global namespace (not in main()) Re: C++ Crash (stack overflow) Thank you very much ! |
|
|