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

Psychic Window Technique

2 Answers   E Logic, Wild Net,


What is the use of CCmdTarget ?

4 Answers  


What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

6 Answers  


What is the difference between ASSERT and VERIFY?

2 Answers  


1)dynamic creation of a Button ?

2 Answers   TCS,






Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A. Explain how a pointer to function can be declared in C++? B. List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header ("Include") Files.

3 Answers   ABC, HCL, Infosys,


what is functioning of DIalodDataXchange ..?

0 Answers  


Tell us something about MFC?

7 Answers   Microsoft,


What is the base class for most MFC classes?

7 Answers   CMC, Siemens,


In SDI how many view's are attached to document object and in MDI how many view's are attached to Document object?

2 Answers   Wipro,


is it possible to display a window .without using windowclass

1 Answers   E Logic,


What is the use of OninitDialog ?

11 Answers   HCL, Nagarro,


Categories