|
|
back to boardAn advice for crashers Using of dynamic memory allocation for the long string char * s = new char [10000000]; //.. delete [] s; allowed me to avoid the crash problem. Suppose it would be helpful for someone. Re: An advice for crashers A better idea is to declear the array outside any functions. #include ... char s[1000000000000000000]; int main(){} If you do so, it won't take up xxxxGB RAM. Instead, it depends on which part of the array you used. For example, you only use 1-10000 of the array, it will use 10KB mem. And that's cool. Re: An advice for crashers Posted by icanwin 16 Oct 2009 15:01 You are not right. Re: An advice for crashers why |
|
|