What are the differences between MFC Exception macros and
C++ exception keywords?

Answers were Sorted based on User's Feedback



What are the differences between MFC Exception macros and C++ exception keywords?..

Answer / hemalatha

The main difference between the macros and the keywords is
that the macros "automatically" delete a caught exception
when the exception goes out of scope. Code using the
keywords does not; exceptions caught in a catch block must
be explicitly deleted. Mixing macros and C++ exception
keywords can cause memory leaks when an exception object is
not deleted, or heap corruption when an exception is
deleted twice.

Is This Answer Correct ?    3 Yes 0 No

What are the differences between MFC Exception macros and C++ exception keywords?..

Answer / mullaikani

Class macros — TRY, CATCH, THROW, and so on — to use the C++
exception-handling keywords try, catch, and throw.
The major difference between the macros and the keywords is
that code using the macros "automatically" deletes a caught
exception when the exception goes out of scope. Code using
the keywords does not, so you must explicitly delete a
caught exception.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More MFC Interview Questions

i have created runtime menu -- ( admistrator ->managepackage,manage module). but now i want to open a dialog when i select manage package and any other diaolg when selecting manage module ( whole selection is at run time only ) . Please HELP .its urgently required

3 Answers   Patni,


What is LoadLibrary function returns?

7 Answers  


what is the size of a process

2 Answers   E Logic, IBM,


What is userdefine Messages in MFC?

1 Answers   HCL,


Does the application have more than one object? If Yes, Briefly explain.

2 Answers   Soltius Infotech,






1)does Frame Thickness in MFC?

1 Answers   winfoware,


1)dynamic creation of a Button ?

2 Answers   TCS,


What is the base class for MFC Framework ?

4 Answers  


What is #progma and where it is used?

5 Answers   L&T,


if both base and derived class have the constructors if i create an object for derive class which class constructor is executed first

10 Answers   Siemens, Symphony,


How do I create a dialog box in mfc?

0 Answers  


1)How to change a text of a button in runtime?

2 Answers  


Categories