What happens if an exception is throws from an, object's
constructor and object's destructor?
Answer Posted / truong
1. If exception is thrown in the constructor, the destructor will be not called.
2. If exception is thrown in the destructor of a static object, exception will be catch in the main.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is fflush c++?
What is diamond problem in c++?
What is null pointer and void pointer and what is their use?
What is the use of ::(scope resolution operator)?
How do I start a c++ project?
Can a constructor return a value?
what are the iterator and generic algorithms.
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What are the two shift operators and what are their functions?
What is prototype for that c string function?
Why do we learn c++?
What is the difference between multiple and multilevel inheritance in c++?
How can we read/write Structures from/to data files?
What is microsoft c++ redistributable 2013?
How can I improve my c++ skills?