|
|
вернуться в форумwhy stack overflow #include <stdio.h> #include <math.h> int main() { double d; int n = 0; double vect[1024*128]; while (scanf("%lf", &d) != EOF) vect[n++] = sqrt(d); while (--n >= 0) printf("%.5lf\n", vect[n]); return 0; } Re: why stack overflow "double vect[1024*128];" You can use "malloc" or "new" operator. Re: why stack overflow Or you can allocate memory as a global variable. (Before line: int main(void)) |
|
|