Catching " " exceptions in recursive C++ functions


Is it possible to capture stack overflow exception in the recursive C ++ function? if so, how?

What will happen in this case

  zero (work) {try () {doWork (); } Hold (...) {doWork (); }}  

I am not looking for answers to specific OS. Just in general

There really is not any portable way to do this A recursive function out of control will usually cause an invalid memory access when it will attempt to allocate a stack frame beyond the stack address space. Typically this will crash your program with segmentation fault / access violation depending on OS. In other words, it does not make a C + + exception that can be handled in a standard way by language.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -