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
Why would you use pointers in c++?
What c++ library is string in?
How would you use the functions randomize() and random()?
Can you please explain the difference between overloading and overriding?
Define pointers?
What can I use instead of namespace std?
Explain how we implement exception handling in c++?
What you know about structures in C++?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
how to explain our contribution in the project?
Can recursive program be written in C++?
What is #include sstream?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is iterator c++?
Is java the same as c++?