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
Define a pointer to a data member of the type pointer to pointer?
What are static variables?
What is a tuple c++?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
How can I disable the "echo" feature?
What is data abstraction? How is it different from data encapsulation?
Can you please explain the difference between overloading and overriding?
What are protected members in c++?
What does new in c++ do?
Define the operators that can be used with a pointer.
Refer to a name of class or function that is defined within a namespace?
What is the full form of c++?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Describe new operator and delete operator?
What is a friend function in c++?