Can you give an example of stack overflow in C++? Other than the recursive case:
void foo() { foo(); }
The typical case that does not involve infinite recursion is declaring an automatic variable on the stack that is too large. For example:
int foo() { int array[1000000]; }