Exceptions do not exist in C, so including the stdlib won't do any good.
I don't know the exact details, but maybe Visual C++ accepts 'catch' without any specification as to what you want to catch, and g++ doesn't.
In any case, I suggest you specify what exceptions you want to catch, for example:
} catch( int e )
} catch( std::exception& e )
} catch( ... ) // Catches every C++ exception
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...