Mingw32 and C++ exception handling.

This is a discussion on Mingw32 and C++ exception handling. within the C++ Programming forums, part of the General Programming Boards category; This question is not about SEH and is not homework.
I'm reading the book "Teach yourself c++ in one hour ...

That code compiled with mingw32 4.5.2 crashes. Compiling it with ms VC++ express 2010 gives the correct answer. What is wrong here? What am I missing with mingw32?
I read some other threads in this forum, but I didn' t found an answer to this question.

I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.

/EH (Exception Handling Model) - If you don't specify or use EHa, catch(...) will catch SEH exceptions as well as regular C++ exceptions. If you set it to EHs, it'll only catch C++ exceptions and you'll have to use __try and __except to catch SEH ones.