Can you give an example of stack overflow in C++? Other than the recursive case:
void foo() { foo(); }
This example shows uncontrolled recursion. Eventually, the stack spaced allocated to this process will be completely overwritten by instances of bar and ret...
int foo( int bar ) { int ret = foo( 42 ); return ret; }