Hey there
Can someone explain how constructors/destructors work in exception handling?
Thks.
Hey there
Can someone explain how constructors/destructors work in exception handling?
Thks.
EXPERIMENTATION...(write some code and see it works).
You can throw inside of, and try/catch within, constructors and destructors.
However, you must be careful when throwing exceptions within destructors. This is because the destructor may have been called due to stack-unwinding from a previous exception!
Read more about exceptions here.
gg
if you want to learn about exceptions then go here and be prepared to read everything.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi