It appears you're new to programming forums in general. Code tags and correct tabbing go a long way.

Okay the "segmentation fault" is misleading. The error text says "Stack Overflow". This is...