is throwing exception from a constructor not a good practice ?
Answer Posted / shwetha.v.g
Actualy though when an object is created memory will b
allocated but the process of allocation of memory will be
complete only if conytructor is successfully invoked so if
constructor throws an exception memory will not be
allocated for that object.
| Is This Answer Correct ? | 1 Yes | 6 No |
Post New Answer View All Answers
What are compilers in c++?
How a pointer differs from a reference?
What is name hiding in c++?
what is upcasting in C++?
Why pointer is used in c++?
How does the copy constructor differ from the assignment operator (=)?
What are c++ templates used for?
What does it mean to declare a member function as virtual?
Does c++ have a hash table?
Will rust take over c++?
Declare a class vehicle and make it an abstract data type.
What are the benefits of pointers?
What are containers in c++?
What is this pointer in c++?
What is std namespace in c++?