segmentation fault 11 in C++ on Mac
You’ve exceeded your stack space given by the OS. If you need more memory, the easiest way is to allocate it dynamically: However, std::vector is preferred in this context, because the above requires you to free the memory by hand. If you can use C++11, you can possibly save some fraction of time by using unique_ptr array specialization, too: Both of … Read more