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

What is a message map?

1 Answers   Mphasis,


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


What function is used to retrieve the currently selected index in a list box?

2 Answers  


What is subclassing?

2 Answers  


if no message handler is available for a message then will deal with the message ? does window proving any default mechanism?

2 Answers   Patni,






What interface must be supported by an ActiveX control?

2 Answers  


1.Get string1,string2,string3 1.add string1 and 2,string1 and 3. 2.replace vowels with T 3.count number of T. 4.remove T 5.COPY string1 to stringf. 6.restore string1. print the following 1.Number of T 2.StringF 3.string1+string2+string3 Use pointers and functions

1 Answers  


what if we provide two message handler for same message ?

1 Answers  


2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers

0 Answers   TCS,


What view class enables you to use an edit control as a view?

1 Answers  


Differ GetMessage, PostMessage & PeakMessage?

4 Answers   Symphony,


In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?

3 Answers   Financial Technologies,


Categories