I'm new to exceptions and I find myself struggling a little. Can some tell me why this doesn't work?


FILE* hFile;

try
{
// Assume hFile has not been initialised on purpose to generate exception

//This should raised an exception and jump to the catch block.
fputs("123", hFile);
......
}
catch( ... )
{
Do_something();
}


As I understand it, catch( ...) should catch all exceptions but in this case it doesn't. Can anyone help?

Spencer