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 problems might the following macro bring to the application?
In c++, what is the difference between method overloading and method overriding?
Define vptr.
What are the three forms of cin.get() and what are their differences?
I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?
What is format for defining a structure?
What is the difference between the parameter to a template and the parameter to a function?
What is meant by entry controlled loop?
What is meant by the term name mangling in c++?
Is c++ a good beginners programming language?
Can you pass a vector to a function?
Can we inherit constructor in c++?
What do you mean by early binding?
Define a constructor - what it is and how it might be called (2 methods)?
Do class declarations end with a semicolon?