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 is setw manipulator in c++?
How long does it take to get good at leetcode?
Explain unexpected() function?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
Difference between overloaded functions and overridden functions
What is an associative container in c++?
What is the best book for c++ beginners?
Why are pointers used?
What is else if syntax?
What are enumerations?
What is polymorphism in c++? Explain with an example?
What is the difference between global variables and static varables?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What are arrays c++?
Can you please explain the difference between static and dynamic binding of functions?